Converts one or more images from one pixel format to another. Block compressed (BC) formats are not supported.
HRESULT Convert(
const Image *srcImages,
size_t nimages,
const TexMetadata &metadata,
DXGI_FORMAT format,
DWORD filter,
float threshold,
ScratchImage &result
)
srcImages
Type: Image *
[in] Pointer to one or more Image structures in a memory buffer.
nimages
Type: size_t
[in] Number of images.
metadata
Type: TexMetadata
[in] Address of a TexMetadata structure.
format
Type: DXGI_FORMAT
[in] One member of the DXGI_FORMAT enumeration.
filter
Type: DWORD
[in] One or more flags from the TEX_FILTER_FLAGS enumeration.
threshold
Type: float
[in] Alpha threshold (in the range 0.0 to 1.0) used for converting to single bit alpha channels.
result
Type: ScratchImage
[out] Pointer to a ScratchImage class instance.
Type: HRESULT
Header: Declared in directxtex.h.