Tips For Success

Having the best tools for document imaging is only half of the equation. Our Tech Tips are designed to provide you with valuable information to help you succeed by achieving faster results with our RasterMaster Imaging and Conversion SDKs or VirtualViewer high-speed document and image viewers. New time-saving tips are added monthly - you can receive them through Imaging News or our Tech Tips RSS feed.

Get Started with VirtualViewer

Tech Tip: 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)