There is always going to be some kind of trade off between performance and quality. This is true whenever working with any imaging software.

If you intend to optimize for performance (i.e., conversion speed), it will likely involve reducing the image quality of the output. If you are interested in maintaining the highest quality/fidelity possible, you should expect your runtimes to increase accordingly.

Improving Performance

The more colors there are in the input or output image, the bigger the file and the slower the processing speed. To reduce the number of colors and improve performance, reduce the bit depth (bits per pixel) value to grayscale (8-bit) or black and white (1-bit).

Use one of the following color reduction methods to reduce 8-bit and 24-bit images to smaller gray scale images. Please see Color Manipulation Methods for more detailed information.

  • IMG_color_gray() converts 24-bit color images to 8-bit gray scale images.
  • IMG_resize_to_gray(int xsize, int ysize) resizes a 1-bit black and white image to a (smaller) 8-bit grayscale image.
  • IMG_diffusion_mono() converts 4, 8 or 24 bit images to 1-bit per pixel bi-level images using the Stucky error diffusion technique. To improve performance in RasterMaster Java, consider the input file type. To reduce the resolution, reduce the DPI value. If the input file is not a raster image, such as PCL, vector PDF, Word or Excel, use one of the following methods to set the DPI and bit depth prior to decompression. Please see Image Quality Manipulation for more detailed information.
  • IMGLOW_set_document_input(int dpi, int bits_pix, int format) converts PDF, Word, Excel, PCL and AFP formats.
  • IMGLOW_set_pcl_input(int dpi, int bits_pix) converts PCL formats only.
  • IMGLOW_set_pdf_input(int dpi, int bits_pix) converts PDF formats only.

Improving Quality

The output quality of your output document may be much lower than the original document if you convert a high quality image to a low quality output such as TIFF_G4_FAX. Please see the following suggestions to improve the quality of the output document:

  • Choose a different output format such as TIFF_LZW to produce an output document with sufficient pixel depth. Supported File Formats shows a list of file formats and their supported bit depths.
  • Use one of the following methods prior to decompression to increase the output dots per inch (DPI) or bit depth:
    • IMGLOW_set_document_input(int dpi, int bits_pix, int format) converts PDF, Word, Excel, PCL and AFP formats.
    • IMGLOW_set_pcl_input(int dpi, int bits_pix) converts PCL formats only.
    • IMGLOW_set_pdf_input(int dpi, int bits_pix) converts PDF formats only. Please see the RasterMaster Java API documentation for more detailed information
  • Use the color promotion method, IMG_promote_24(void), to promote 1-bit, 4-bit and 8-bit images to 24-bit images. Please see Color Manipulation Methods for more detailed information.