---
name: "lqr_carver_scan_ext"
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_carver_scan"
---

# lqr\_carver\_scan\_ext(3)

read out a multi-size image one pixel at a time

Part of [lqr\_carver\_scan(3)](/lqr_carver_scan/3.md).

## NAME

lqr\_carver\_scan, lqr\_carver\_scan\_ext - read out a multi-size image one pixel at a time

## SYNOPSIS

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

**gboolean lqr\_carver\_scan(LqrCarver\*** *carver***, gint\*** *x***, gint\*** *y***, guchar\*\*** *rgb***);**

**gboolean lqr\_carver\_scan\_ext(LqrCarver\*** *carver***, gint\*** *x***, gint\*** *y***, void\*\*** *rgb***);**

## DESCRIPTION

The functions **lqr\_carver\_scan** and **lqr\_carver\_scan\_ext** are used to read out the multi-size image contained in the LqrCarver object pointed to by *carver* one pixel at a time. They store the pixel coordinates in the variables pointed to by *x* and *y*, and the pixel content in the array pointed to by *rgb*; then they move the readout pointer to the next pixel, or they reset it if the end of the image is reached.

The first one must only be used on the LqrCarver objects created with *lqr\_carver\_new*, i.e. with 8-bit images, while the second one is general (see [**LqrColDepth**(3)](/LqrColDepth/3.md)), but the *rgb* pointer must be cast to the appropriate type to be used (i.e pass the address of a pointer to void to the function **lqr\_carver\_scan\_ext**, then cast it to a pointer of the appropriate type and use this last one for reading the output).

The *rgb* variable will point to an array which is internal to the LqrCarver object, so there is no need to allocate memory for it. However, it should only be accessed right after a call to the scan functions, and writing to it must be avoided.

## RETURN VALUE

These functions return TRUE in case the readout is successful and the end of the image was not reached, FALSE otherwise. If **lqr\_carver\_scan** is called over a non-8-bit LqrCarver object, it will return FALSE.

## SEE ALSO

[**LqrColDepth**(3)](/LqrColDepth/3.md), [**lqr\_carver\_scan\_reset**(3)](/lqr_carver_scan_reset/3.md), [**lqr\_carver\_scan\_line**(3)](/lqr_carver_scan_line/3.md)

## COPYRIGHT

Copyright © 2007-2009 Carlo Baldassi\
