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.

IWICDdsFrameDecode::GetSizeInBlocks method

Gets the width and height, in blocks, of the DDS image.

Syntax


HRESULT GetSizeInBlocks(
  [out] UINT *pWidthInBlocks ,
  [out] UINT *pHeight    InBlocks 
);

Parameters

pWidthInBlocks [out]

Type: UINT*

The width of the DDS image in blocks.

pHeight InBlocks [out]

Type: UINT*

The height of the DDS image in blocks.

Return value

Type: HRESULT

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

Remarks

For block compressed textures, the returned width and height values do not completely define the texture size because the image is padded to fit the closest whole block size. For example, three BC1 textures with pixel dimensions of 1x1, 2x2 and 4x4 will all report pWidthInBlocks = 1 and pHeightInBlocks = 1.

If the texture does not use a block-compressed DXGI_FORMAT, this method returns the texture size in pixels; for these formats the block size returned by IWICDdsFrameDecoder::GetFormatInfo is 1x1.

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

IWICDdsFrameDecode

 

 

Show:
© 2017 Microsoft