Index

C/C++ Functions

fxImageRead

DT_SLONG fxImageRead(DT_AUX_INFO* info, DT_UBYTE** bitmap_ptr, DT_ID_SWORD* bitmap_format, DT_ID_SWORD* bitmap_subformat, DT_SLONG* width, DT_SLONG* height, DT_UWORD flags, const DT_AUX_GRAPHICS_ATTRIBS* gattribs, DT_AUX_USER_STREAM* user_stream)

Short Description: Read bitmap image from user stream

This function reads a compressed image from a user-defined stream and returns a plain bitmap stored in a memory buffer. The image compression format is specified by the FileFormat member variable of the info structure.

Parameters

ParameterDescription

info

Pointer to the DT_AUX_INFO structure containing the applicable initialization parameters.

bitmap_ptr

A valid pointer to an address of a buffer that will hold the bitmap. This buffer is dynamically allocated and must be freed by calling dtFree when no longer needed.

bitmap_format

A valid pointer to a variable that will hold the format, or number of bits-per-pixel, of the bitmap. This value will be either 8, 16, 24 or 32.

bitmap_subformat

A valid pointer to a variable that will hold the color configuration of the pixel. Presently the only supported value is 0.

width

A valid pointer to a variable that will hold the width of the bitmap, in pixels.

height

A valid pointer to a variable that will hold the height of the bitmap, in pixels.

flags

A bitmask value.

  • bit 0 (1) — Flip the bitmap vertically

gattribs

See DT_AUX_GRAPHICS_ATTRIBS.

user_stream

See DT_AUX_USER_STREAM.

Return Value

If the function was successful, the return value is 1. Otherwise, the function returns 0.

 

Index