QualityFactor Property Bag Item

Show in webframe

The quality factor is a number that determines the degree of loss in the compression process for lossy formats. The following LEAD encoders support the QualityFactor property bag item:

LEAD Encoder CLSID Valid QualityFactor values
CLSID_WICLeadAbcEncoder One of the WICLeadAbcQualityFactorPredefined enumeration values.
CLSID_WICLeadCmpEncoder One of the WICLeadCmpQualityFactorPredefined enumeration values, or 2 through 255
CLSID_WICLeadCmwEncoder 2 through 255
CLSID_WICLeadDicomEncoder Depends on the subformat being used. See remarks below.
CLSID_WICLeadIcoEncoder Depends on the subformat being used. See remarks below.
CLSID_WICLeadHdpEncoder 1 through 255
CLSID_WICLeadJpegEncoder 0 (lossless) or 2 through 255
CLSID_WICLeadJ2kEncoder -1(lossless), 0(lossless), 1 through 255
CLSID_WICLeadMngEncoder 2 through 255
CLSID_WICLeadPdfEncoder Depends on the subformat being used. See remarks below.
CLSID_WICLeadPngEncoder 0 through 9
CLSID_WICLeadTiffEncoder Depends on the subformat being used. See remarks below.
CLSID_WICLeadXpsEncoder Depends on the subformat being used. See remarks below.

Typically, a lower quality factor results in higher quality and larger files. A higher quality factor results in smaller but lower quality files. Different LEAD Bitmap Encoders have different valid quality factor ranges. For example, the LEAD Jpeg Bitmap Encoder supports a quality factor in the range from 2 through 255 inclusive. But the LEAD Png Bitmap Encoder supports a quality factor in the range of 0 through 9 inclusive.



In addition to a quality factor range, some LEAD Bitmap Encoders support predefined quality factors. For example the LEAD Cmp Bitmap Encoder supports a quality factor range of 2 through 255, and also the predefined quality factors in theWICLeadCmpQualityFactorPredefined enumeration. For more information, refer to the IWICLeadBitmapEncoder::GetQualityFactorPredefined method and the IWICLeadBitmapEncoder::GetQualityFactorPredefinedFriendlyName method.



Certain LEAD Bitmap Encoders can store image data in more than one subformat. For example, the LEAD Xps Bitmap Encoder supports JPEG compression (with a quality factor range of 2 -255) or PNG compression (with a quality factor range of 0-9). So the SubFormat property of a LEAD Bitmap Encoder can affect the valid quality factor range. To get the quality factor range for a LEAD Bitmap Encoder, call the IWICLeadBitmapEncoder::GetQualityFactorRange method. The tables below show the QualityFactor ranges for these encoders.



To determine if a LEAD Bitmap Encoder supports the QualityFactor property, call the IWICLeadBitmapEncoder::GetSubFormatFlags method.

CLSID_WICLeadDicomEncoder
SubFormat QualityFactor Values
WICLeadSubFormatDicomJpegGray 0(lossless), 2 through 255
WICLeadSubFormatDicomJ2kGray 0(lossless), 2 through 255
WICLeadSubFormatDicomJpegColor 0(lossless), 2 through 255
All other SubFormats Ignored

CLSID_WICLeadTiffEncoder
SubFormat QualityFactor Values
WICLeadSubFormatTifAbc One of the WICLeadAbcQualityFactorPredefined enumeration values.
WICLeadSubFormatTifJpeg 0(lossless), 2 through 255
WICLeadSubFormatTifJpeg411 0(lossless), 2 through 255
WICLeadSubFormatTifJpeg422 0(lossless), 2 through 255
WICLeadSubFormatTifCmp One of the WICLeadCmpQualityFactorPredefined enumeration values, or 2 through 255
WICLeadSubFormatTifJ2k -1(lossless), 0(lossless), 1 through 255
WICLeadSubFormatTifCmw 2 through 255
All other SubFormats Ignored
CLSID_WICLeadPdfEncoder
SubFormat QualityFactor Values
WICLeadSubFormatRasPdfLzw 2 through 255
WICLeadSubFormatRasPdfJpeg 0(lossless), 2 through 255
WICLeadSubFormatRasPdfJpeg422 0(lossless), 2 through 255
WICLeadSubFormatRasPdfJpeg411 0(lossless), 2 through 255
WICLeadSubFormatRasPdfLzwCmyk 2 through 255
All other SubFormats Ignored

CLSID_WICLeadXpsEncoder
SubFormat QualityFactor Values
WICLeadSubFormatXps 0 through 9
WICLeadSubFormatXpsJpeg 0(lossless), 2 through 255
WICLeadSubFormatXpsJpeg422 0(lossless), 2 through 255
WICLeadSubFormatXpsJpeg411 0(lossless), 2 through 255

CLSID_WICLeadIcoEncoder
SubFormat QualityFactor Values
WICLeadSubFormatPngIco 0 through 9
WICLeadSubFormatTifJpeg 0(lossless), 2 through 255
WICLeadSubFormatWinIco Ignored

References

LEAD WIC-Enabled Codecs Overview
Registering a LEAD WIC-Enabled Codec
LEAD Bitmap Encoder Property Bag
LEAD Bitmap Encoder Property Bag: Jpeg2000 Specific Options
LEAD Bitmap Encoder Property Bag: Jbig2 Specific Options
LEAD Bitmap Encoder Property Bag: XPS Specific Options

 

 


Products | Support | Contact Us | Copyright Notices
© 2006-2014 All Rights Reserved. LEAD Technologies, Inc.