Class DdsDecoder
[Guid("409cd537-8532-40cb-9774-e2feb2df4e9c")]
public class DdsDecoder : ComObject
- Inheritance
-
DdsDecoder
Constructors
DdsDecoder(nint)
public DdsDecoder(nint nativePtr)
Parameters
nativePtr
nint
Properties
Parameters
Gets DDS-specific data.
public DdsParameters Parameters { get; }
Property Value
Methods
GetFrame(int, int, int, out BitmapFrameDecode)
Retrieves the specified frame of the DDS image.
public void GetFrame(int arrayIndex, int mipLevel, int sliceIndex, out BitmapFrameDecode bitmapFrameOut)
Parameters
arrayIndex
intThe requested index within the texture array.
mipLevel
intThe requested mip level.
sliceIndex
intThe requested slice within the 3D texture.
bitmapFrameOut
BitmapFrameDecodeA reference to a BitmapFrameDecode object.
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 BitmapFrameDecode, 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.
Operators
explicit operator DdsDecoder(nint)
public static explicit operator DdsDecoder(nint nativePtr)
Parameters
nativePtr
nint