Convert (const Image&, DXGI_FORMAT, DWORD, float, ScratchImage&)

Converts one or more images from one pixel format to another. Block compressed (BC) formats are not supported.

Syntax

HRESULT Convert(
         const Image &srcImage,
         DXGI_FORMAT format,
         DWORD filter,
         float threshold,
         ScratchImage &image
)  

Parameters

srcImage
Type: Image 

[in] Pointer to one or more Image structures in a memory buffer.

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.

image
Type: ScratchImage 

[out] Pointer to a ScratchImage class instance.

Return value

Type: HRESULT 

Success or error code.

Requirements

Header: Declared in directxtex.h.