Home | History | Annotate | Download | only in lpng_v163

Lines Matching full:sbit

1331 /* Write the sBIT chunk */

1333 png_write_sBIT(png_structrp png_ptr, png_const_color_8p sbit, int color_type)
1348 if (sbit->red == 0 || sbit->red > maxbits ||
1349 sbit->green == 0 || sbit->green > maxbits ||
1350 sbit->blue == 0 || sbit->blue > maxbits)
1352 png_warning(png_ptr, "Invalid sBIT depth specified");
1356 buf[0] = sbit->red;
1357 buf[1] = sbit->green;
1358 buf[2] = sbit->blue;
1364 if (sbit->gray == 0 || sbit->gray > png_ptr->usr_bit_depth)
1366 png_warning(png_ptr, "Invalid sBIT depth specified");
1370 buf[0] = sbit->gray;
1376 if (sbit->alpha == 0 || sbit->alpha > png_ptr->usr_bit_depth)
1378 png_warning(png_ptr, "Invalid sBIT depth specified");
1382 buf[size++] = sbit->alpha;