Export (0) Print
Expand All

IWICImagingFactory2::CreateImageEncoder method

Creates a new image encoder object.

Syntax


HRESULT CreateImageEncoder(
  [in]   ID2D1Device *pD2DDevice,
  [out]  IWICImageEncoder **ppWICImageEncoder
);

Parameters

pD2DDevice [in]

The ID2D1Device object on which the corresponding image encoder is created.

ppWICImageEncoder [out]

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

Minimum supported client

Windows 8 [desktop apps | Windows Store apps]

Minimum supported server

Windows Server 2012 [desktop apps | Windows Store apps]

Header

Wincodec.h

IDL

Wincodec.idl

Library

Windowscodecs.lib

DLL

Windowscodecs.dll

See also

IWICImagingFactory2

 

 

Community Additions

ADD
Show:
© 2014 Microsoft