Windows apps
Collapse the table of content
Expand the table of content
Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

IWICPlanarBitmapSourceTransform::DoesSupportTransform method

Use this method to determine if a desired planar output is supported and allow the caller to choose an optimized code path if it is. Otherwise, callers should fall back to IWICBitmapSourceTransform or IWICBitmapSource and retrieve interleaved pixels.

The following transforms can be checked:

  • Determine if the flip/rotate option specified via WICBitmapTransformOptions is supported.
  • Determine if the requested planar pixel format configuration is supported.
  • Determine the closest dimensions the implementation can natively scale to given the desired dimensions.

When a transform is supported, this method returns the description of the resulting planes in the pPlaneDescriptions parameter.

Syntax


HRESULT DoesSupportTransform(
  [in, out]       UINT                      *puiWidth,
  [in, out]       UINT                      *puiHeight,
                  WICBitmapTransformOptions dstTransform,
                  WICPlanarOptions          dstPlanarOptions,
  [in]      const WICPixelFormatGUID        *pguidDstFormats,
  [out]           WICBitmapPlaneDescription *pguidDstFormats,
                  UINT                      cPlanes,
  [out]           BOOL                      *pfIsSupported
);

Parameters

puiWidth [in, out]

Type: UINT*

On input, the desired width. On output, the closest supported width to the desired width; this is the same size or larger than the desired width.

puiHeight [in, out]

Type: UINT*

On input, the desired height. On output, the closest supported height to the desired height; this is the same size or larger than the desired width.

dstTransform

Type: WICBitmapTransformOptions

The desired rotation or flip operation. Multiple WICBitmapTransformOptions can be combined in this flag parameter, see WICBitmapTransformOptions.

dstPlanarOptions

Type: WICPlanarOptions

Used to specify additional configuration options for the transform. See WICPlanarOptions for more detail.

WIC JPEG Decoder:

WICPlanarOptionsPreserveSubsampling can be specified to retain the subsampling ratios when downscaling. By default, the JPEG decoder attempts to preserve quality by downscaling only the Y plane in some cases, changing the image to 4:4:4 chroma subsampling.

pguidDstFormats [in]

Type: const WICPixelFormatGUID*

The requested pixel formats of the respective planes.

pguidDstFormats [out]

Type: WICBitmapPlaneDescription*

When *pfIsSupported == TRUE, the array of plane descriptions contains the size and format of each of the planes.

WIC JPEG Decoder: The Cb and Cr planes can be a different size from the values returned by puiWidth and puiHeight due to chroma subsampling.

cPlanes

Type: UINT

The number of component planes requested.

pfIsSupported [out]

Type: BOOL*

Set to TRUE if the requested transforms are natively supported.

Return value

Type: HRESULT

Check the value of pfIsSupported to determine if the transform is supported via IWICPlanarBitmapSourceTransform::CopyPixels. If this method fails, the output parameters for width, height, and plane descriptions are zero initialized. Other return values indicate failure.

Requirements

Minimum supported client

Windows 8.1 [desktop apps | Windows Store apps]

Minimum supported server

Windows Server 2012 R2 [desktop apps | Windows Store apps]

Header

Wincodec.h

IDL

Wincodec.idl

Library

Windowscodecs.lib

DLL

Windowscodecs.dll

See also

IWICPlanarBitmapSourceTransform
WICBitmapTransformOptions
WICPlanarOptions
WICBitmapPlaneDescription
IWicPlanarBitmapSourceTransform::CopyPixels

 

 

Show:
© 2017 Microsoft