Lines Matching defs:info_ptr
1037 png_read_transform_info(png_structp png_ptr, png_infop info_ptr)
1043 if (info_ptr->color_type == PNG_COLOR_TYPE_PALETTE)
1046 info_ptr->color_type = PNG_COLOR_TYPE_RGB_ALPHA;
1048 info_ptr->color_type = PNG_COLOR_TYPE_RGB;
1049 info_ptr->bit_depth = 8;
1050 info_ptr->num_trans = 0;
1055 info_ptr->color_type |= PNG_COLOR_MASK_ALPHA;
1056 if (info_ptr->bit_depth < 8)
1057 info_ptr->bit_depth = 8;
1058 info_ptr->num_trans = 0;
1066 info_ptr->color_type &= ~PNG_COLOR_MASK_ALPHA;
1067 info_ptr->num_trans = 0;
1068 info_ptr->background = png_ptr->background;
1076 info_ptr->gamma = png_ptr->gamma;
1079 info_ptr->int_gamma = png_ptr->int_gamma;
1085 if ((png_ptr->transformations & PNG_16_TO_8) && (info_ptr->bit_depth == 16))
1086 info_ptr->bit_depth = 8;
1092 if (((info_ptr->color_type == PNG_COLOR_TYPE_RGB) ||
1093 (info_ptr->color_type == PNG_COLOR_TYPE_RGB_ALPHA)) &&
1094 png_ptr->palette_lookup && info_ptr->bit_depth == 8)
1096 info_ptr->color_type = PNG_COLOR_TYPE_PALETTE;
1102 if ((png_ptr->transformations & PNG_PACK) && (info_ptr->bit_depth < 8))
1103 info_ptr->bit_depth = 8;
1108 info_ptr->color_type |= PNG_COLOR_MASK_COLOR;
1113 info_ptr->color_type &= ~PNG_COLOR_MASK_COLOR;
1116 if (info_ptr->color_type == PNG_COLOR_TYPE_PALETTE)
1117 info_ptr->channels = 1;
1118 else if (info_ptr->color_type & PNG_COLOR_MASK_COLOR)
1119 info_ptr->channels = 3;
1121 info_ptr->channels = 1;
1125 info_ptr->color_type &= ~PNG_COLOR_MASK_ALPHA;
1128 if (info_ptr->color_type & PNG_COLOR_MASK_ALPHA)
1129 info_ptr->channels++;
1134 ((info_ptr->color_type == PNG_COLOR_TYPE_RGB) ||
1135 (info_ptr->color_type == PNG_COLOR_TYPE_GRAY)))
1137 info_ptr->channels++;
1141 info_ptr->color_type |= PNG_COLOR_MASK_ALPHA;
1150 if(info_ptr->bit_depth < png_ptr->user_transform_depth)
1151 info_ptr->bit_depth = png_ptr->user_transform_depth;
1152 if(info_ptr->channels < png_ptr->user_transform_channels)
1153 info_ptr->channels = png_ptr->user_transform_channels;
1157 info_ptr->pixel_depth = (png_byte)(info_ptr->channels *
1158 info_ptr->bit_depth);
1160 info_ptr->rowbytes = PNG_ROWBYTES(info_ptr->pixel_depth,info_ptr->width);