Compression Quality Factors in the LEADTOOLS MRC Class

It is possible to set one or more quality factors when saving an image file to the LEAD MRC, MRC, TIF LEAD MRC, or TIF MRC format. 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 or TIF LEAD MRC format (using the LSegment::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 LSegment::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.

Help Version 21.0.2021.7.2
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2021 LEAD Technologies, Inc. All Rights Reserved.

LEADTOOLS MRC C++ Class Library Help
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2021 LEAD Technologies, Inc. All Rights Reserved.