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.

Tech Tip: Changing TIFF Horizontal and Vertical Resolution

Snowbound Software’s RasterMaster for the .NET Platform includes the ability to change the horizontal or vertical resolution for file formats such as TIFF files. For example, if you have a file that is 240 x 120 and you want to change resolution to 240 x 240, you can use the C# code sample below to change the resolution.

status = simage.CIMG_decompress_bitmap_page(fileName,page);

 

sdibHeader = new CDIB_HEADER();
status = simage.CIMG_bitmap_info(sdibHeader);
// Or use status = simage.CIMGLOW_get_bitmap_header(sdibHeader);

 

//set XDPI
//sdibHeader.biXPelsPerMeter = 200;
//Set YDPI
sdibHeader.biYPelsPerMeter = 2*sdibHeader.biYPelsPerMeter;

 

status = simage.CIMGLOW_set_bitmap_header(sdibHeader);

 

status = simage.CIMG_resize_bitmap(240, 240);