Lines Matching refs:info_ptr
1880 png_read_transform_info(png_structp png_ptr, png_infop info_ptr) in png_read_transform_info() argument
1887 if (info_ptr->color_type == PNG_COLOR_TYPE_PALETTE) in png_read_transform_info()
1894 info_ptr->color_type = PNG_COLOR_TYPE_RGB_ALPHA; in png_read_transform_info()
1897 info_ptr->color_type = PNG_COLOR_TYPE_RGB; in png_read_transform_info()
1899 info_ptr->bit_depth = 8; in png_read_transform_info()
1900 info_ptr->num_trans = 0; in png_read_transform_info()
1907 info_ptr->color_type |= PNG_COLOR_MASK_ALPHA; in png_read_transform_info()
1909 if (info_ptr->bit_depth < 8) in png_read_transform_info()
1910 info_ptr->bit_depth = 8; in png_read_transform_info()
1912 info_ptr->num_trans = 0; in png_read_transform_info()
1923 info_ptr->background = png_ptr->background; in png_read_transform_info()
1932 info_ptr->gamma = png_ptr->gamma; in png_read_transform_info()
1935 if (info_ptr->bit_depth == 16) in png_read_transform_info()
1940 info_ptr->bit_depth = 8; in png_read_transform_info()
1945 info_ptr->bit_depth = 8; in png_read_transform_info()
1959 info_ptr->bit_depth = 8; in png_read_transform_info()
1964 info_ptr->bit_depth = 8; in png_read_transform_info()
1975 info_ptr->color_type = (png_byte)(info_ptr->color_type | in png_read_transform_info()
1981 info_ptr->color_type = (png_byte)(info_ptr->color_type & in png_read_transform_info()
1988 if (((info_ptr->color_type == PNG_COLOR_TYPE_RGB) || in png_read_transform_info()
1989 (info_ptr->color_type == PNG_COLOR_TYPE_RGB_ALPHA)) && in png_read_transform_info()
1990 png_ptr->palette_lookup && info_ptr->bit_depth == 8) in png_read_transform_info()
1992 info_ptr->color_type = PNG_COLOR_TYPE_PALETTE; in png_read_transform_info()
1998 if (png_ptr->transformations & PNG_EXPAND_16 && info_ptr->bit_depth == 8 && in png_read_transform_info()
1999 info_ptr->color_type != PNG_COLOR_TYPE_PALETTE) in png_read_transform_info()
2001 info_ptr->bit_depth = 16; in png_read_transform_info()
2006 if ((png_ptr->transformations & PNG_PACK) && (info_ptr->bit_depth < 8)) in png_read_transform_info()
2007 info_ptr->bit_depth = 8; in png_read_transform_info()
2010 if (info_ptr->color_type == PNG_COLOR_TYPE_PALETTE) in png_read_transform_info()
2011 info_ptr->channels = 1; in png_read_transform_info()
2013 else if (info_ptr->color_type & PNG_COLOR_MASK_COLOR) in png_read_transform_info()
2014 info_ptr->channels = 3; in png_read_transform_info()
2017 info_ptr->channels = 1; in png_read_transform_info()
2022 info_ptr->color_type = (png_byte)(info_ptr->color_type & in png_read_transform_info()
2024 info_ptr->num_trans = 0; in png_read_transform_info()
2028 if (info_ptr->color_type & PNG_COLOR_MASK_ALPHA) in png_read_transform_info()
2029 info_ptr->channels++; in png_read_transform_info()
2034 ((info_ptr->color_type == PNG_COLOR_TYPE_RGB) || in png_read_transform_info()
2035 (info_ptr->color_type == PNG_COLOR_TYPE_GRAY))) in png_read_transform_info()
2037 info_ptr->channels++; in png_read_transform_info()
2040 info_ptr->color_type |= PNG_COLOR_MASK_ALPHA; in png_read_transform_info()
2048 if (info_ptr->bit_depth < png_ptr->user_transform_depth) in png_read_transform_info()
2049 info_ptr->bit_depth = png_ptr->user_transform_depth; in png_read_transform_info()
2051 if (info_ptr->channels < png_ptr->user_transform_channels) in png_read_transform_info()
2052 info_ptr->channels = png_ptr->user_transform_channels; in png_read_transform_info()
2056 info_ptr->pixel_depth = (png_byte)(info_ptr->channels * in png_read_transform_info()
2057 info_ptr->bit_depth); in png_read_transform_info()
2059 info_ptr->rowbytes = PNG_ROWBYTES(info_ptr->pixel_depth, info_ptr->width); in png_read_transform_info()
2067 png_ptr->info_rowbytes = info_ptr->rowbytes; in png_read_transform_info()