---
name: "lqr_rwindow_read"
section: "3"
platform: "linux"
package: "liblqr-1-0-dev"
version: "0.4.1-2"
release: "Debian 7 (Wheezy)"
platforms: ["linux"]
url: "https://new.carta.tech/lqr_rwindow_read"
---

# lqr\_rwindow\_read(3)

read the content of a LqrReadingWindow object

## NAME

lqr\_rwindow\_read - read the content of a LqrReadingWindow object

## SYNOPSIS

```
#include <lqr.h>
```

**gfloat lqr\_rwindow\_read(LqrReadingWindow\*** *rwindow***, gint** *x***, gint** *y***, gint** *channel***);**

## DESCRIPTION

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)](/lqr_rwindow_get_radius/3.md).

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.

## SEE ALSO

**lqr\_carver\_set\_energy\_function**(3), [**lqr\_rwindow\_get\_read\_t**(3)](/lqr_rwindow_get_read_t/3.md), [**lqr\_rwindow\_get\_radius**(3)](/lqr_rwindow_get_radius/3.md), [**lqr\_rwindow\_get\_channels**(3)](/lqr_rwindow_get_channels/3.md)

## COPYRIGHT

Copyright © 2007-2009 Carlo Baldassi\
