JPEG Format Overview

This topic provides information about the native JPEG codec available through the Windows Imaging Component (WIC).

Codec Identity

The following table provides codec identification information.

Formal Name(s)Joint Photographic Experts Group (JPEG)
File Name Extension(s)jpe, jpeg, jpg
MIME typeimage/jpeg, image/jpe, image/jpg
Specification SupportJFIF Specification 1.02

 

The following table lists the GUIDs used to identify the native JPEG codec components.

ComponentFriendly NameGUID
Container FormatGUID_ContainerFormatJpeg19e4a5aa-5662-4fc5-a0c01758028e1057
DecoderCLSID_WICJpegDecoder9456a480-e88b-43ea-9e730b2d9b71b1ca
EncoderCLSID_WICJpegEncoder1a34f5c1-4a5a-46dc-b6441f4567e7a676

 

Encoding

The WIC encoding API are designed to be codec-independent and image encoding for WIC-enabled codecs is essentially the same. For more information about image encoding using the WIC API, see the Encoding Overview.

Encoder Options

WIC-enabled codecs differ at the encoding option level. Encoder options reflect the capabilities of an image encoder and each native codec supports a set of these encoder options. Encoder options can be basic WIC supported options available to all WIC enabled codes (though not necessarily supported) or codec-specific options designed by the image format codec. To manage these encoding options during the encoding process, WIC uses the IPropertyBag2 interface . For more information about using the IPropertyBag2 interface for WIC encoding , see the Encoding Overview.

The JPEG codec uses basic WIC options. The following table lists the WIC encoder options supported by the native JPEG codec.

Property NameVARTYPEValue RangeDefault Value
ImageQualityVT_R40 - 1.0Not used.
BitmapTransformVT_UI1 WICBitmapTransformOptions WICBitmapTransformRotate0
LuminanceVT_UI4/VT_ARRAY64 Entries (DCT)Default luminance table.
ChrominanceVT_UI4/VT_ARRAY64 Entries (DCT)Default chrominance table.
JpegYCrCbSubsamplingVT_UI1 WICJpegYCrCbSubsamplingOption WICJpegYCrCbSubsampling420
SuppressApp0VT_BOOLTRUE/FALSEFALSE

 

If an encoder option is present in the IPropertyBag2 option list that the codec does not support, it is ignored.

ImageQuality Option

Specifies the desired image fidelity. 0.0 indicates the lowest possible fidelity and 1.0 specifies the highest fidelity.

The default encoding for this codec does not use this value.

BitmapTransform Option

Specifies how the image is to be transformed during image decoding. This option must be set to one of the WICBitmapTransformOptions enumeration values.

The default value is WICBitmapTransformRotate0.

Luminance Option

Specifies the grayscale brightness level table to use for encoding.

Chrominance Option

Specifies the chrominance table to use for encoding.

JpegYCrCbSubsampling Option

Specifies the subsampling ratio to use for YCrCb encoding.

The default value is WICJpegYCrCbSubsampling420.

SuppressApp0 Option

Specifies whether to suppress the write of App0 metadata while encoding the image data.

The default value is FALSE.

Decoding

The WIC decoding API are designed to be codec-independent and image decoding for WIC-enabled codecs is essentially the same. For more information about image decoding, see the Decoding Overview. For more information about using decoded image data, see the Bitmap Sources Overview.

The native JPEG codec also supports the IWICBitmapSourceTransform on frame decoding adding advaced options for decoding an image stream. For more information about these advanced options, see the Bitmap Sources Overview.

 

 

Community Additions

ADD
Show:
© 2014 Microsoft