Determine the JPEG quality factor by using Visual C# .NET (324790)
The information in this article applies to:
- Microsoft .NET Framework SDK 1.0
- Microsoft Windows XP Professional
- the operating system: Microsoft Windows XP 64-Bit Edition
This article was previously published under Q324790 For a Microsoft Visual Basic .NET version of this article, see 324788.
This article refers to the following Microsoft .NET Framework Class Library namespaces:
SUMMARY
Compression in a Joint Photographic Experts Group (JPEG) file is controlled by a set of quantization tables. Typically, there are two such tables in each file: one for the luminance (brightness) information and the other for the chrominance (color) information. These tables are 8x8 matrices that determine how the 8x8 blocks of discrete cosine coefficients are quantized.
Most applications allow you to specify a number, called the JPEG quality factor, to control the compression level. This number typically has a range from 0 or 1, which results in more compression and a smaller file, to 100, which results in almost no compression and a larger file. However, this number is not stored in the file.
The JPEG quality factor is used to generate a pair of quantization tables. Many applications that are based on the Independent JPEG Group (IJG) code generate the same quantization tables as the IJG reference code. However, some applications may use custom quantization tables instead.
For more information about how the quality factor is used to influence the quantization tables, see the JPEG specification and the IJG reference code, both of which are available through the "References" section of this article.
REFERENCES
For more information, visit the following organization Web sites:
Modification Type: | Minor | Last Reviewed: | 5/10/2006 |
---|
Keywords: | kbDSWGDI2003Swept kbHOWTOmaster kbinfo KB324790 kbAudDeveloper |
---|
|