This sample converts a document to TIFF and selects the appropriate TIFF format (TIFF Group 4, or TIFF_LZW) based on the color profile of each source page. You can find the samples in the \samples\snippets\ directory.


The input is the document name defined in variable inputFilename and defaults to C:\images\mysource.pdf.


The output is the document name defined in variable outputFilename and defaults to C:\images\myoutput.tif.

For instructions on running this sample, please see the instructions to Run RasterMaster samples in your IDE or to Run samples from the Command Prompt in the Overview.

Listed below are the methods used in this sample:

  • IMGLOW_set_document_input(int, int, int) specifies the input DPI and bit-depth for PDF, MSOffice, RTF, PCL, and AFP files.
  • IMGLOW_get_pages(String) prints the total number of pages in the input document.
  • IMG_decompress_bitmap(String, int) reads in a document in any format and converts it to a valid RasterMaster image.
  • IMGLOW_detect_color() checks all pixels to determine if the image is color or gray scale.
  • IMG_thresh_mono(int) permanently converts 4, 8, or 24-bit images to 1-bit per pixel using a threshold passed as the second argument.
  • IMG_save_bitmap(byte, int) saves the current Snowbnd image object to the format specified by comp_type. The string value is the output file.