It is possible to set one or more quality factors when saving an image file to the LEAD MRC, TIF LEAD MRC, MRC, TIF MRC or PDF format using MRC segmentation techniques. The quality factor (Q factor) is a number that determines the degree of loss in the compression process. Possible values range from 2 to 255, where 2 is the highest quality and 255 is the most compression. These values are set using the members of the COMPRESSIONOPTIONS structure.
When saving a file that has 8-bit grayscale segments in the LEAD MRC, LEAD MRC2, TIF LEAD MRC, or TIF LEAD MRC2, PDF, format (using the L_MrcSaveBitmap function), use a COMPRESSIONOPTIONS.nGrayscale8BitQFactor property of 0 to produce lossless CMW or lossless JPEG files when selecting those as the nGrayscale8BitCoder. Otherwise, set the nGrayscale8BitQFactor property to a value from 2 to 255, where 2 is the highest quality and 255 the most compression.
When saving a file in the standard MRC or TIF MRC format (using the L_MrcSaveBitmapT44 function), the only valid picture compression (COMPRESSIONOPTIONS.nPictureCoder value) is MRC_PICTURE_COMPRESSION_JPEG. Set the quality factor using the nPictureQFactor member; setting a value from 2 to 255, where 2 is the highest quality and 255 the most compression.
Products | Support | Feedback: Compression Quality Factors in the LEADTOOLS MRC C API | Introduction | Help Version 19.0.2017.6.27