Support for IWICDevelopRaw
To enable applications to support RAW processing, codec authors are strongly encouraged to implement all of the parameters of IWICDevelopRaw. For Windows 7, Windows Imaging Component (WIC) will require support for all of the IWICDevelopRaw. If your file format doesn't support all of these parameters, then you should revise your image file format.
To enable basic RAW processing in applications, codecs must support adjustments to exposure (ExposureCompensationSupport) and color (such as KelvinWhitePointSupport and TintSupport). In addition, output to specific color spaces and pixel formats is highly recommended. Support for other adjustments is, of course, encouraged, and is required for Windows 7.
The RAW codec must provide basic support for image rotation and fast previewing. Rotation can be specified in two distinct ways:
- IWICDevelopRaw::SetRotation method. This method sets the desired rotation angle for the output of subsequent calls to CopyPixels.
- IWICBitmapSourceTransform::CopyPixels method. The caller can set the dstTransform option to indicate the desired rotation angle.
These two approaches differ in the following ways:
- Only IWICDevelopRaw settings can be persisted across instances of the decoder object.
- IWICBitmapSourceTransform::CopyPixels applies only to that particular call; there is no persistence of any kind.
- IWICDevelopRaw provides for much finer grained control in rotation. IWICBitmapSourceTransform::CopyPixels is constrained to 90-degree increments.
If rotation is specified in both IWICDevelopRaw and IWICBitmapSourceTransform, then the rotation effect is cumulative. For example, if IWICDevelopRaw specifies a 25-degree rotation and IWICBitmapSourceTransform specifies a 90-degree rotation, then the following should happen:
- Calls to IWICBitmapFrameDecode::CopyPixels should apply a 25-degree rotation (that is, only the amount specified in IWICDevelopRaw).
- Calls to IWICBitmapSourceTransform::CopyPixels with a dstTransform amount of 90 then result in a 115-degree rotation (25 + 90).
- Again, only the 25-degree rotation specified via IWICDevelopRaw::SetRotation can be persisted.
In Windows Vista, the IWICBitmapFrameDecode::GetThumbnail and IWICBitmapDecoder::GetPreview methods allow callers to get embedded thumbnails and preview images, respectively. These are intended to return precalculated previews and thumbnails from the image file stream. Generating previews or thumbnails "on the fly" results in poor performance in the Windows Explorer and Photo Viewer. The codec also must provide a way to return an updated screen resolution image quickly when users are doing interactive control of the processing settings.
Calls to IWICDevelopRaw::SetRenderMode will determine what subsequent calls to IWICBitmapFrameDecode::CopyPixels return (favoring either speed or quality). Additionally, the IWICBitmapSourceTransform interface can be used to determine whether downsampling is necessary and can increase performance when it can be applied. The color fidelity of all the images should be comparable. When changes are made to the processing settings, all of these renderings should reflect the changes.
Related topics
-
Conceptual