Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Encodes the image to the frame given by the IWICBitmapFrameEncode.
Syntax
HRESULT WriteFrame(
[in] ID2D1Image *pImage,
[in] IWICBitmapFrameEncode *pFrameEncode,
[in] const WICImageParameters *pImageParameters
);
Parameters
[in] pImage
Type: ID2D1Image*
The Direct2D image that will be encoded.
[in] pFrameEncode
Type: IWICBitmapFrameEncode*
The frame encoder to which the image is written.
[in] pImageParameters
Type: const WICImageParameters*
Additional parameters to control encoding.
Return value
Type: HRESULT
If this method succeeds, it returns S_OK. Otherwise, it returns an HRESULT error code.
Remarks
The image passed in must be created on the same device as in IWICImagingFactory2::CreateImageEncoder. If the pImageParameters are not specified, a set of useful defaults will be assumed, see WICImageParameters for more info.
You must correctly and independently have set up the IWICBitmapFrameEncode before calling this API.
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 |