Compression Quality Factors

You can specify a quality factor when saving an image file to LEAD, JFIF, LEAD2JFIF, LEAD2JFIF, JTIF, LEAD1JTIF, and LEAD2JTIF. The quality factor (Q factor) is a number that determines the degree of loss in the compression process. You can set a value from 2 to 255, where 2 is the highest quality and 255 is the most compression.

For JFIF and JTIF compression only, you can also use a factor of 0 to produce lossless JPEG files.

For LEAD CMP compression (8-bit, 12-bit and 24-bit only), you can also use one of the following enhanced options:

Q Factor

Predefined options for LEAD only

PQ1

(-1) Perfect quality 1. This option compresses all colors of a 24-bit file and maintains the quality of the original image at a smaller file size. As the name suggests, there is no visual loss of color at this setting.

PQ2

(-2) Perfect quality 2.This will produce a smaller file size than PQ1 while maintaining similar quality.

QFS

(-3) Quality far more important than size. This option removes colors not noticed by the human eye. Most viewers cannot tell the difference between an image compressed at this level and the original image.

QMS

(-4) Quality more important than size. While more colors are removed, most of them are colors or shades that are close to one another. The compressed image will appear very much like the original image. It will take some study to see the difference.

QS

(-5) Quality and size equally important. This option provides the highest compression while maintaining good image quality. Try this option first, then move up or down the list accordingly to obtain acceptable compression size and image quality.

SQS

(-6) Size more important that quality (sharp). This option is recommended for images that have sharp edges. For example, an image that has a text overlay or an image with many straight lines. While it creates a larger file than the next option, it retains better edges.

SQT

(-7) Size more important than quality (less tiling). This option produces less tiling in the image than the previous options. However, it may distort text or straight lines. It is a good option for image database applications.

MCQ

(-8) Maximum compression keeping quality. This option provides maximum compression while maintaining as high as possible image quality.

MC

(-9) Maximum compression. This option gives maximum compression. It is equivalent to a Q factor of 255.

For the PNG format, the qFactor can be a value between 0 and 9. 0 = (default compression), 1 (fastest compression) ... 9 (highest compression ratio)

For JP2 and J2K files, the qFactor can be a value between –1 and 255. –1, and 0 represent lossless compression, while all the values between 1 and 255 are considered as compression ratios. For example a qFactor of 10 is a compression ratio of 10. A qFactor of 1 gives the best lossy quality, while a qFactor of 255 gives the highest compression. If the UseFileSize property of the IEpnRasterOptions Object is set to VARINAT_TRUE, then the compression used is based on the file size intend to be generated. Note that you can set the file size in the TargetFileSize property of the IEpnRasterOptions Object. But if the UseFileSize is set to VARINAT_FALSE, then the compression will depend on the QFactor property of the IEpnRasterOptions Object.