Following is a list of the basic public methods associated
with the LqrCarver
objects:
constructor and destructor
LqrCarver * lqr_carver_new (guchar *buffer, gint width, gint height, gint bpp); void lqr_carver_destroy (LqrCarver *carver);
initialization
LqrRetVal lqr_carver_init (LqrCarver *carver, gint delta_x, gfloat rigidity);
image manipulations
LqrRetVal lqr_carver_resize (LqrCarver *carver, gint new_width, gint new_width); LqrRetVal lqr_carver_flatten (LqrCarver *carver);
readout
gboolean lqr_carver_scan (LqrCarver *carver, gint *x, gint *y, guchar **carvergb); gboolean lqr_carver_scan_by_row (LqrCarver *carver); gboolean lqr_carver_scan_line (LqrCarver *carver, gint *n, guchar **carvergb);
get values
gint lqr_carver_get_width (LqrCarver *carver); gint lqr_carver_get_height (LqrCarver *carver); gint lqr_carver_get_bpp (LqrCarver *carver);
The fastest way to see how they work is having a look at the code
of examples/liquidrescale-basic.cpp
, which is
a very simple and fully commented demostrative program.
The return value of many functions is of type LqrRetVal
. This is just an
enum type which can be used for signal handling, see this section.
The other classes are optional: the class LqrVMap
is used to hold the
carving information (and the class LqrVMapList
is used to retrieve it
from the LqrCarver
ojects); the class LqrProgress
is used to customize
progress report from the resizing engine (by default is turned off).
A complete list of the library public method can be found at the end of this document