png_set_shift

Name

png_set_shift -- shift pixel values to valid bit-depth

Synopsis

#include <png.h>

void png_set_shift(png_structp png_ptr, png_color_8p true_bits);

Description

If image data in a row buffer is stored in a bit depth other than those supported by PNG, png_set_shift() shall scale the values to a valid bit-depth defined by PNG format. For example, 3-bit data in range 0-7 is scaled to 4-bit PNG.