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

Compresses one or more images to a block compression (BC) format.

Syntax

HRESULT Compress(
         const Image &srcImage,
         DXGI_FORMAT format,
         DWORD compress,
         float alphaRef,
         ScratchImage &cImage
)  

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.

compress
Type: DWORD 

[in] One or more flags from the TEX_COMPRESS_FLAGS enumeration.

alphaRef
Type: float 

[in] Reference alpha value, only used by BC1 for supporting conversions to 1-bit transparency.

cImage
Type: ScratchImage 

[out] Pointer to a ScratchImage class instance.

Return value

Type: HRESULT 

Success or error code.

Requirements

Header: Declared in directxtex.h.