lqr_rwindow_read(3) read the content of a LqrReadingWindow object


#include <lqr.h>

gfloat lqr_rwindow_read(LqrReadingWindow* rwindow, gint x, gint y, gint channel);


The function lqr_rwindow_read returns the content of the reading window rwindow at point x, y and at channel channel.

The coordinates x and y are relative to the rwindow centre, and they both can range from -radius to radius (extremes included), where radius can be obtained with the function lqr_rwindow_get_radius(3).

The function returns 0 when the coordinates are out of range, either because they are beyond the rwindow radius or because they are outside the image boundary.

The channel parameter specifies which channel to read out; depending on the rwindow reader type, the range and meaning of this parameter changes: for the cases LQR_ER_BRIGHTNESS and LQR_ER_LUMA it must be 0, because the readout consists of a single channel, for LQR_ER_RGBA it must be between 0 and 3 (and then the readout will contain the RGBA information), while for LQR_ER_CUSTOM it must be one of the original image channels.


Copyright © 2007-2009 Carlo Baldassi