---
name: "lqr_carver_set_black_channel"
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_set_black_channel"
---

# lqr\_carver\_set\_black\_channel(3)

sets the black channel index in a LqrCarver object

## NAME

lqr\_carver\_set\_black\_channel - sets the black channel index in a LqrCarver object

## SYNOPSIS

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

**LqrRetVal lqr\_carver\_set\_black\_channel(LqrCarver \*** *carver***, gint** *channel\_index***);**

## DESCRIPTION

The function **lqr\_carver\_set\_black\_channel** sets the black channel index of the image stored in the LqrCarver pointed to by *carver* to *channel\_index* (between 0 and channels - 1, where channels is the number of colour channels of the *carver*).

Use a negative value for *cahnnel\_index* to specify that no black channel is present.

If the specified channel coincides with the current value of the alpha channel, the alpha channel is unset.

Calling this function sets the image time of the *carver* to LQR\_CUSTOM\_IMAGE. Furthermore, the image color model will be assumed to be subtractive by the function [**lqr\_rwindow\_read**(3)](/lqr_rwindow_read/3.md) when it computes the brightness or the luma.

## RETURN VALUE

The return value follows the Liquid Rescale library signalling system.

## SEE ALSO

[**LqrImageType**(3)](/LqrImageType/3.md), [**lqr\_carver\_new**(3)](/lqr_carver_new/3.md), [**lqr\_carver\_set\_image\_type**(3)](/lqr_carver_set_image_type/3.md), [**lqr\_carver\_set\_alpha\_channel**(3)](/lqr_carver_set_alpha_channel/3.md), [**lqr\_carver\_get\_image\_type**(3)](/lqr_carver_get_image_type/3.md), [**lqr\_carver\_get\_channels**(3)](/lqr_carver_get_channels/3.md)

## COPYRIGHT

Copyright © 2007-2009 Carlo Baldassi\
