Name

lqr_carver_new, lqr_carver_destroy — the LqrCarver object constructor and destructor

Synopsis

#include <lqr.h>
LqrCarver* lqr_carver_new(guchar*  buffer,
 gint  width,
 gint  height,
 gint  bpp);
void lqr_carver_destroy(LqrCarver*  carver);

Constructor

Description

The function lqr_carver_new creates a new LqrCarver object from an RGB image of size width * height with bpp colour channels.

The image must be stored in buffer as a plain array of unsigned chars, ordered by row, then by column, then by colour channel.

The buffer will be incorporated into the LqrCarver object and must not be accessed any more

Return value

The return value is the address of the newly created LqrCarver object, or NULL in case of failure.

Destructor

Description

The function lqr_carver_destroy destroys the LqrCarver object pointed to by carver, and all of its attched components (visibility maps and attached carvers).