General Guidelines for Implementing RAW Codecs

Compared to non-RAW image types such as JPEG or TIFF, there are two notable differences in how RAW image formats are expected to behave in Windows:

  • Most RAW image formats are presumed to be "read only" and probably will not support pixel encoding to RAW format. However, because Windows Imaging Component (WIC) requires an encoder to support metadata write-back, RAW codec authors should plan to implement at least a skeleton encoder class.

  • Decoding a full-size RAW image can take a long time compared to other formats. For this reason, Microsoft recommends that certain approaches be taken to minimize decoding latency and to ensure support for scenarios such as rapid rendering of thumbnails and previews.

    For example, all RAW codec authors must implement the IWICBitmapSourceTransform interface, which provides a mechanism to notify the decoder in advance of the target bitmap size, thus enabling optimized decoding to a smaller output image size.

Conceptual

Windows Imaging Component Overview

WIC Guidelines for Camera RAW Image Formats

How to Write a WIC-Enabled CODEC