IWICBitmapSourceTransform::GetClosestSize method

Returns the closest dimensions the implementation can natively scale to given the desired dimensions.

Syntax

HRESULT GetClosestSize(
  UINT *puiWidth,
  UINT *puiHeight
);

Parameters

puiWidth

Type: UINT*

The desired width. A pointer that receives the closest supported width.

puiHeight

Type: UINT*

The desired height. A pointer that receives the closest supported height.

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 for native scaling:

  • BMP, ICO, GIF, TIFF: No implementation of IWICBitmapSourceTransform.
  • PNG: No scaling support.
  • JPEG: Native down-scaling by a factor of 8, 4, or 2.
  • JPEG-XR: Native scaling of the original image by powers of 2.

Requirements

   
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