Setting the Resolution when Converting File Formats

Snowbound Software’s RasterMasterTM for the .NET Platform includes the ability to set the resolution when converting a file format from one format to another. For example, if you are converting a JPEG file to a group 4 TIFF file, you can make sure the group 4 TIFF uses a resolution of 300.

You can use the C# code sample below to set the resolution:

status = simage.CIMG_decompress_bitmap_page(strfile, i)

status = simage.CIMG_bitmap_info(sdibHeader)

Dim iPageWidth As Integer = sdibHeader.biWidth / sdibHeader.biXPelsPerMeter
Dim iPageHeight As Integer = sdibHeader.biHeight / sdibHeader.biYPelsPerMeter

sdibHeader.biXPelsPerMeter = 300
sdibHeader.biYPelsPerMeter = 300
status = simage.CIMGLOW_set_bitmap_header(sdibHeader)

status = simage.CIMG_resize_bitmap(iPageWidth * 300, iPageHeight * 300)

status = simage.CIMG_save_bitmap(strSaveImage, iFormat)

Category:

Online Demo