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.

IWICDdsDecoder::GetFrame method

Retrieves the specified frame of the DDS image.

Syntax


HRESULT GetFrame(
  [in]  UINT                  arrayIndex,
  [in]  UINT                  mipLevel,
  [in]  UINT                  sliceIndex,
  [out] IWICBitmapFrameDecode **ppIBitmapFrame
);

Parameters

arrayIndex [in]

Type: UINT

The requested index within the texture array.

mipLevel [in]

Type: UINT

The requested mip level.

sliceIndex [in]

Type: UINT

The requested slice within the 3D texture.

ppIBitmapFrame [out]

Type: IWICBitmapFrameDecode**

A pointer to a IWICBitmapFrameDecode object.

Return value

Type: HRESULT

If this method succeeds, it returns S_OK. Otherwise, it returns an HRESULT error code.

Remarks

A DDS file can contain multiple images that are organized into a three level hierarchy. First, DDS file may contain multiple textures in a texture array. Second, each texture can have multiple mip levels. Finally, the texture may be a 3D (volume) texture and have multiple slices, each of which is a 2D texture. See the DDS documentation for more information.

WIC maps this three level hierarchy into a linear array of IWICBitmapFrameDecode, accessible via IWICBitmapDecoder::GetFrame. However, determining which frame corresponds to a triad of arrayIndex, mipLevel, and sliceIndex value is not trivial because each mip level of a 3D texture has a different depth (number of slices). This method provides additional convenience over IWICBitmapDecoder::GetFrame for DDS images by calculating the correct frame given the three indices.

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

IWICDdsDecoder
WICDdsFormatInfo
ID3D11Device::CreateTexture2D
CreateBitmap

 

 

Show:
© 2017 Microsoft