LqrCarver* lqr_carver_new(guchar* buffer, gint width, gint height, gint channels);
- LqrCarver* lqr_carver_new_ext(void* buffer, gint width, gint height, gint channels, LqrColDepth colour_depth);
The image must be stored in buffer as a plain array of unsigned chars (for lqr_carver_new) or the appropriate type cast to void (for lqr_carver_new_ext), ordered by row, then by column, then by colour channel.
In the extended constructor lqr_carver_new_ext, the additional parameter colour_depth is required to specify the colour depth of the buffer (see LqrColDepth(3) for more information).
After calling the function, the buffer will be owned by the LqrCarver object and must not be accessed any more, unless you subsequently call the lqr_carver_set_preserve_input_image(3) function.
The image type is et automatically from the value of channels according to this table:
Table 3.1. Image types assigned by default
The return value is the address of the newly created LqrCarver object, or NULL in case of failure (insufficient memory).
COPYRIGHTCopyright © 2007-2009 Carlo Baldassi