Index

C/C++ Functions

dtBitmapCompress

DT_SLONG dtBitmapCompress(DT_DTENGINE engine, DT_UBYTE* bitmap_addr, DT_SLONG bitmap_len)

Short Description: Compress grayscale bitmap data

This function compresses grayscale bitmap data using D-Type's grayscale bitmap compression algorithm.

Parameters

ParameterDescription

engine

Handle of the previously created Standard Engine instance.

bitmap_addr

A valid pointer to the memory buffer at which the non-compressed bitmap grayscale bitmap data begins and to which the function will place compressed bitmap data.

bitmap_len

Length of the non-compressed bitmap data (actual length), in bytes.

Note: If compressing grayscale bitmap data of glyph images in the bitmap cache obtained by dtGlyphDoOutput, dtGlyphDoOutputFrac, dtCharDoOutput or dtCharDoOutputFrac, simply set this parameter to memory_bitmap.l

Return Value

The function returns the difference between the non-compressed and compressed bitmap size, i.e. the reduction amount. This is always a non-negative number.

 

Index