---
name: "lqr_carver_flatten"
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_flatten"
---

# lqr\_carver\_flatten(3)

flatten a LqrCarver object

## NAME

lqr\_carver\_flatten - flatten a LqrCarver object

## SYNOPSIS

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

**LqrRetVal lqr\_carver\_flatten(LqrCarver\*** *carver***);**

## DESCRIPTION

The function **lqr\_carver\_flatten** can be used to discard the visibility map information and flatten the multi-size image contained in the LqrCarver object pointed to by *carver* to its current state.

It will also reset the internally stored original width and height, as if the image was just loaded in the LqrCarver object.

This function must only be invoked over initialised LqrCarver objects.

This function is called internally each time the rescaling direction changes, or at each new step in a multiple-step enlargement, but, when calling it manually, the discarded visibility map will not be dumped automatically by it; use the functions [**lqr\_vmap\_dump**(3)](/lqr_vmap_dump/3.md) or [**lqr\_vmap\_internal\_dump**(3)](/lqr_vmap_internal_dump/3.md) in order to save it before invoking this function.

## RETURN VALUE

The return value follows the Liquid Rescale library signalling system. Errors can occur for non-initialised LqrCarver objects or in case of insufficient memory.

## SEE ALSO

[**LqrRetVal**(3)](/LqrRetVal/3.md), [**lqr\_carver\_init**(3)](/lqr_carver_init/3.md), [**lqr\_carver\_resize**(3)](/lqr_carver_resize/3.md), [**lqr\_carver\_cancel**(3)](/lqr_carver_cancel/3.md)

## COPYRIGHT

Copyright © 2007-2009 Carlo Baldassi\
