Export (0) Print
Expand All

IWICImageEncoder::WriteThumbnail method

Encodes the given image as the thumbnail to the given WIC bitmap encoder.

Syntax


HRESULT WriteThumbnail(
  [in]          ID2D1Image *pImage,
  [in]          IWICBitmapEncoder *pEncoder,
  [in, unique]  const WICImageParameters *pImageParameters
);

Parameters

pImage [in]

Type: ID2D1Image*

The Direct2D image that will be encoded.

pEncoder [in]

Type: IWICBitmapEncoder*

The encoder on which the thumbnail is set.

pImageParameters [in]

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

You must create the image that you pass in on the same device as in IWICImagingFactory2::CreateImageEncoder. If you don't specify additional parameters in the variable that pImageParameters points to, the encoder uses a set of useful defaults. For info about these defaults, see WICImageParameters.

Before you call WriteThumbnail, you must set up the IWICBitmapEncoder interface for the encoder on which you want to set the thumbnail.

If WriteThumbnail fails, it might return E_OUTOFMEMORY, D2DERR_WRONG_RESOURCE_DOMAIN, or other error codes from the encoder.

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

IWICImageEncoder
IWICImagingFactory2::CreateImageEncoder
WICImageParameters

 

 

Community Additions

ADD
Show:
© 2014 Microsoft