IWICBitmapFrameEncode::SetThumbnail method

Sets the frame thumbnail if supported by the codec.

Syntax


HRESULT SetThumbnail(
  [in]  IWICBitmapSource *pIThumbnail
);

Parameters

pIThumbnail [in]

Type: IWICBitmapSource*

The bitmap source to use as the thumbnail.

Return value

Type: HRESULT

Returns S_OK if successful, or an error value otherwise.

Returns WINCODEC_ERR_UNSUPPORTEDOPERATION if the feature is not supported by the encoder.

Remarks

We recommend that you call SetThumbnail before calling WritePixels or WriteSource. The thumbnail won't be added to the encoded file if SetThumbnail is called after a call to WritePixels or WriteSource.

  • BMP, PNG

    Setting thumbnails is unsupported. This function will return WINCODEC_ERR_UNSUPPORTEDOPERATION.

  • JPEG

    Setting the thumbnail is supported. The source image will be re-encoded as either an 8bpp or 24bpp JPEG and will be written to the JPEG’s APP1 metadata block.

  • TIFF

    Setting the thumbnail is supported. The source image will be re-encoded as a TIFF and will be written to the frame’s SubIFD block.

  • JPEG-XR

    Setting the thumbnail is supported. The source image will be re-encoded as an additional 8bpp or 24bpp frame.

Requirements

Minimum supported client

Windows XP with SP2, Windows Vista [desktop apps | Windows Store apps]

Minimum supported server

Windows Server 2008 [desktop apps | Windows Store apps]

Header

Wincodec.h

IDL

Wincodec.idl

Library

Windowscodecs.lib

DLL

Windowscodecs.dll

See also

IWICBitmapFrameEncode
Conceptual
Encoding Overview
How to Write a WIC-Enabled CODEC

 

 

Community Additions

ADD
Show:
© 2014 Microsoft