Lines Matching defs:info_ptr

1924 png_read_transform_info(png_structrp png_ptr, png_inforp info_ptr)
1931 if (info_ptr->color_type == PNG_COLOR_TYPE_PALETTE)
1938 info_ptr->color_type = PNG_COLOR_TYPE_RGB_ALPHA;
1941 info_ptr->color_type = PNG_COLOR_TYPE_RGB;
1943 info_ptr->bit_depth = 8;
1944 info_ptr->num_trans = 0;
1954 info_ptr->color_type |= PNG_COLOR_MASK_ALPHA;
1956 if (info_ptr->bit_depth < 8)
1957 info_ptr->bit_depth = 8;
1959 info_ptr->num_trans = 0;
1970 info_ptr->background = png_ptr->background;
1979 * TODO: this looks wrong; the info_ptr should end up with a gamma equal to
1981 * the info_ptr is used by the app after the rows have been read.
1983 info_ptr->colorspace.gamma = png_ptr->colorspace.gamma;
1986 if (info_ptr->bit_depth == 16)
1991 info_ptr->bit_depth = 8;
1996 info_ptr->bit_depth = 8;
2010 info_ptr->bit_depth = 8;
2015 info_ptr->bit_depth = 8;
2026 info_ptr->color_type = (png_byte)(info_ptr->color_type |
2032 info_ptr->color_type = (png_byte)(info_ptr->color_type &
2039 if (((info_ptr->color_type == PNG_COLOR_TYPE_RGB) ||
2040 (info_ptr->color_type == PNG_COLOR_TYPE_RGB_ALPHA)) &&
2041 png_ptr->palette_lookup && info_ptr->bit_depth == 8)
2043 info_ptr->color_type = PNG_COLOR_TYPE_PALETTE;
2049 if (png_ptr->transformations & PNG_EXPAND_16 && info_ptr->bit_depth == 8 &&
2050 info_ptr->color_type != PNG_COLOR_TYPE_PALETTE)
2052 info_ptr->bit_depth = 16;
2057 if ((png_ptr->transformations & PNG_PACK) && (info_ptr->bit_depth < 8))
2058 info_ptr->bit_depth = 8;
2061 if (info_ptr->color_type == PNG_COLOR_TYPE_PALETTE)
2062 info_ptr->channels = 1;
2064 else if (info_ptr->color_type & PNG_COLOR_MASK_COLOR)
2065 info_ptr->channels = 3;
2068 info_ptr->channels = 1;
2073 info_ptr->color_type = (png_byte)(info_ptr->color_type &
2075 info_ptr->num_trans = 0;
2079 if (info_ptr->color_type & PNG_COLOR_MASK_ALPHA)
2080 info_ptr->channels++;
2085 ((info_ptr->color_type == PNG_COLOR_TYPE_RGB) ||
2086 (info_ptr->color_type == PNG_COLOR_TYPE_GRAY)))
2088 info_ptr->channels++;
2091 info_ptr->color_type |= PNG_COLOR_MASK_ALPHA;
2099 if (info_ptr->bit_depth < png_ptr->user_transform_depth)
2100 info_ptr->bit_depth = png_ptr->user_transform_depth;
2102 if (info_ptr->channels < png_ptr->user_transform_channels)
2103 info_ptr->channels = png_ptr->user_transform_channels;
2107 info_ptr->pixel_depth = (png_byte)(info_ptr->channels *
2108 info_ptr->bit_depth);
2110 info_ptr->rowbytes = PNG_ROWBYTES(info_ptr->pixel_depth, info_ptr->width);
2118 png_ptr->info_rowbytes = info_ptr->rowbytes;