Writing Image Streams

[The feature associated with this page, Windows Media Format 11 SDK, is a legacy feature. It has been superseded by Source Reader and Sink Writer. Source Reader and Sink Writer have been optimized for Windows 10 and Windows 11. Microsoft strongly recommends that new code use Source Reader and Sink Writer instead of Windows Media Format 11 SDK, when possible. Microsoft suggests that existing code that uses the legacy APIs be rewritten to use the new APIs if possible.]

The inputs for an image stream must be RGB-formatted bitmap images. The writer coordinates the compression of input image samples using the JPEG format. Before you begin writing a file containing an image stream, you must set an image quality for the input, using the g_wszJPEGCompressionQuality setting. Use IWMWriterAdvanced2::SetInputSetting to set the quality to a DWORD value ranging from 1 to 100. Low values represent a high compression ratio at the expense of quality, while high values produce high quality images that require more space.

Image streams often require larger buffer windows than ordinary video streams. The exact size required depends on the type of image and the image quality, among other factors. Use trial and error to determine the appropriate size for the images you intend to process.

Image Streams

To Set Input Settings

Writing ASF Files