API Reference > Functions > odMonoDxt1RGBCompress Function
odMonoDxt1RGBCompress Function
Syntax
C++
bool odMonoDxt1RGBCompress(const OdUInt8 * pInput, OdUInt32 nInputWidth, OdUInt32 nInputHeight, OdUInt32 nInputScanlineLength, const OdUInt8 * pColor1, const OdUInt8 * pColor2, OdUInt8 * pOutput, OdUInt32 nOutputWidth, OdUInt32 nOutputHeight);

mono_dxt1_compressor.h

Parameters 
Description 
const OdUInt8 * pInput 
[in] Input binary data (as 1bpp BMP image).  
OdUInt32 nInputWidth 
[in] Width of input image.  
OdUInt32 nInputHeight 
[in] Height of input image.  
OdUInt32 nInputScanlineLength 
[in] Scanline length of input image including alignment bytes.  
const OdUInt8 * pColor1 
[in] First color for monochrome image (index 0).  
const OdUInt8 * pColor2 
[in] Second color for monochrome image (index 1).  
OdUInt8 * pOutput 
[in] Preallocated output buffer.  
OdUInt32 nOutputWidth 
[in] Width of output image.  
OdUInt32 nOutputHeight 
[in] Height of output image. 

Effectively compress input monochrome (1bpp) image into Dxt1 texture format.

Output width and height must be dividible on 4x4 blocks.

Copyright © 2002–2020. Open Design Alliance. All rights reserved.