IWICBitmapSourceTransform::GetClosestPixelFormat method (wincodec.h)
Retrieves the closest pixel format to which the implementation of IWICBitmapSourceTransform can natively copy pixels, given a desired format.
Syntax
HRESULT GetClosestPixelFormat(
[in, out] WICPixelFormatGUID *pguidDstFormat
);
Parameters
[in, out] pguidDstFormat
Type: WICPixelFormatGUID*
A pointer that receives the GUID of the pixel format that is the closest supported pixel format of the desired format.
Return value
Type: HRESULT
If this method succeeds, it returns S_OK. Otherwise, it returns an HRESULT error code.
Remarks
The Windows provided codecs provide the following support:
- BMP, ICO, GIF, TIFF: No implementation of IWICBitmapSourceTransform.
- JPEG, PNG, JPEG-XR: Trivial support (always returns the same value as IWICBitmapFrameDecode::GetPixelFormat).
Requirements
Requirement | Value |
---|---|
Minimum supported client | Windows XP with SP2, Windows Vista [desktop apps | UWP apps] |
Minimum supported server | Windows Server 2008 [desktop apps | UWP apps] |
Target Platform | Windows |
Header | wincodec.h |
Library | Windowscodecs.lib |