705 for (; rp > png_ptr->
row_buf; rp--)
707 if (*rp >> padding != 0)
708 png_ptr->num_palette_max = 1;
717 for (; rp > png_ptr->
row_buf; rp--)
719 int i = ((*rp >> padding) & 0x03);
721 if (i > png_ptr->num_palette_max)
722 png_ptr->num_palette_max =
i;
724 i = (((*rp >> padding) >> 2) & 0x03);
726 if (i > png_ptr->num_palette_max)
727 png_ptr->num_palette_max =
i;
729 i = (((*rp >> padding) >> 4) & 0x03);
731 if (i > png_ptr->num_palette_max)
732 png_ptr->num_palette_max =
i;
734 i = (((*rp >> padding) >> 6) & 0x03);
736 if (i > png_ptr->num_palette_max)
737 png_ptr->num_palette_max =
i;
747 for (; rp > png_ptr->
row_buf; rp--)
749 int i = ((*rp >> padding) & 0x0f);
751 if (i > png_ptr->num_palette_max)
752 png_ptr->num_palette_max =
i;
754 i = (((*rp >> padding) >> 4) & 0x0f);
756 if (i > png_ptr->num_palette_max)
757 png_ptr->num_palette_max =
i;
767 for (; rp > png_ptr->
row_buf; rp--)
769 if (*rp > png_ptr->num_palette_max)
770 png_ptr->num_palette_max = (int) *rp;
int i
Definition: rw_test.cpp:37
png_byte * png_bytep
Definition: pngconf.h:600
png_uint_32 width
Definition: png.h:896
png_bytep row_buf
Definition: pngstruct.h:225
png_uint_16 num_palette
Definition: pngstruct.h:239
png_byte pixel_depth
Definition: png.h:901
png_size_t rowbytes
Definition: png.h:897
png_byte bit_depth
Definition: png.h:899