png_set_background
Name
png_set_background -- set the background for given image
Synopsis
void
png_set_background
(png_structp
png_ptr, png_color_16p
background_color, int
background_gamma_code, int
need_expand, double
background_gamma);
Description
png_set_background() shall set the background of an image with alpha channel or
simple transparency with the specified background color. If background_gamma_code
is set to PNG_BACKGROUND_GAMMA_SCREEN, it indicates that the supplied background
color is in the gamma space of the display, else if it is set to
PNG_BACKGROUND_GAMMA_FILE, the color is in the gamma space of the file. If the
background color is supplied at the original bit-depth for a grayscale image that
is expanded to truecolor or to a higher bit-depth, need_expand must be set to 1,
but if the background color is supplied at the expanded bit-depth, need_expand
must be set to 0. Similarly for paletted images, if background color is supplied
as a palette index, need_expand must be set to 1, else if background color is
supplied as an RGB triplet, need_expand must be set to 0.