Bsoft function

img_gray2RGBA

Source:

src/img/img_colour.c

Description:

Converts an image from gray scale to RGB (red-green-blue-alpha).

Algorithm:

	The image is first converted to byte format.

Each byte is then expanded to three with the same value.
The key variable that is changed is the number channels, going from
one for gray scale images to three for RGB.
The fourth channel (transparency or alpha) is set to 0 if the
input is zero and 255 otherwise.

Arguments:

Bimage* pimage (replaced by new image).

Returns:

int error code.

Prototype:

int img_gray2RGBA(Bimage* p)

Functions used:

bfree

Other objects included:

struct Bimage


Generated by bdoc.pl on Mon Jun 15 11:47:25 2009


Back to the Bsoft home