Index

C/C++ Functions

dtBitmapDecompress

DT_UBYTE* dtBitmapDecompress(DT_DTENGINE engine, const DT_UBYTE* bitmap_addr, DT_SLONG bitmap_len)

Short Description: Decompress grayscale bitmap data

This function decompresses compressed grayscale bitmap data.

Parameters

ParameterDescription

engine

Handle of the previously created Standard Engine instance.

bitmap_addr

A valid pointer to the memory buffer at which the compressed grayscale bitmap data begins.

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

bitmap_len

Length of the corresponding non-compressed bitmap data (actual length), in bytes. It is imperative that applications supply this parameter correctly since this is the only way for the decompression algorithm to determine when the decompression cycle is over.

Note: If decompressing 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

If successful, the return value is a pointer to a memory buffer at which the plain 8-bpp grayscale bitmap data (non-compressed) begins. This buffer is dynamically allocated and must be released later by calling the dtBitmapFree function. If not successful (e.g. an out of memory condition occurs), the return value will be DV_NULL.

Comments

The dtBitmapDecompress function can be used to decompress compressed grayscale bitmap data of glyph images in the bitmap cache. This data can be obtained by calling dtGlyphDoOutput, dtGlyphDoOutputFrac, dtCharDoOutput and dtCharDoOutputFrac when the bitmap cache compression is enabled.

 

Index