IWICImagingFactory2::CreateImageEncoder method (wincodec.h)
Creates a new image encoder object.
Syntax
HRESULT CreateImageEncoder(
[in] ID2D1Device *pD2DDevice,
[out] IWICImageEncoder **ppWICImageEncoder
);
Parameters
[in] pD2DDevice
The ID2D1Device object on which the corresponding image encoder is created.
[out] ppWICImageEncoder
A pointer to a variable that receives a pointer to the IWICImageEncoder interface for the encoder object that you can use to encode Direct2D images.
Return value
If this method succeeds, it returns S_OK. Otherwise, it returns an HRESULT error code.
Remarks
You must create images to pass to the image encoder on the same Direct2D device that you pass to this method.
You are responsible for setting up the bitmap encoder itself through the existing IWICBitmapEncoder APIs. The IWICBitmapEncoder or the IWICBitmapFrameEncode object is passed to each of the IWICImageEncoder methods: WriteThumbnail, WriteFrame, and WriteFrameThumbnail.
Requirements
Requirement | Value |
---|---|
Minimum supported client | Windows 8 [desktop apps | UWP apps] |
Minimum supported server | Windows Server 2012 [desktop apps | UWP apps] |
Target Platform | Windows |
Header | wincodec.h |
Library | Windowscodecs.lib |
DLL | Windowscodecs.dll |