Home | History | Annotate | Download | only in lpng_v163

Lines Matching full:info_ptr

1916 png_read_transform_info(png_structrp png_ptr, png_inforp info_ptr)

1923 if (info_ptr->color_type == PNG_COLOR_TYPE_PALETTE)
1930 info_ptr->color_type = PNG_COLOR_TYPE_RGB_ALPHA;
1933 info_ptr->color_type = PNG_COLOR_TYPE_RGB;
1935 info_ptr->bit_depth = 8;
1936 info_ptr->num_trans = 0;
1943 info_ptr->color_type |= PNG_COLOR_MASK_ALPHA;
1945 if (info_ptr->bit_depth < 8)
1946 info_ptr->bit_depth = 8;
1948 info_ptr->num_trans = 0;
1959 info_ptr->background = png_ptr->background;
1968 * TODO: this looks wrong; the info_ptr should end up with a gamma equal to
1970 * the info_ptr is used by the app after the rows have been read.
1972 info_ptr->colorspace.gamma = png_ptr->colorspace.gamma;
1975 if (info_ptr->bit_depth == 16)
1980 info_ptr->bit_depth = 8;
1985 info_ptr->bit_depth = 8;
1999 info_ptr->bit_depth = 8;
2004 info_ptr->bit_depth = 8;
2015 info_ptr->color_type = (png_byte)(info_ptr->color_type |
2021 info_ptr->color_type = (png_byte)(info_ptr->color_type &
2028 if (((info_ptr->color_type == PNG_COLOR_TYPE_RGB) ||
2029 (info_ptr->color_type == PNG_COLOR_TYPE_RGB_ALPHA)) &&
2030 png_ptr->palette_lookup && info_ptr->bit_depth == 8)
2032 info_ptr->color_type = PNG_COLOR_TYPE_PALETTE;
2038 if (png_ptr->transformations & PNG_EXPAND_16 && info_ptr->bit_depth == 8 &&
2039 info_ptr->color_type != PNG_COLOR_TYPE_PALETTE)
2041 info_ptr->bit_depth = 16;
2046 if ((png_ptr->transformations & PNG_PACK) && (info_ptr->bit_depth < 8))
2047 info_ptr->bit_depth = 8;
2050 if (info_ptr->color_type == PNG_COLOR_TYPE_PALETTE)
2051 info_ptr->channels = 1;
2053 else if (info_ptr->color_type & PNG_COLOR_MASK_COLOR)
2054 info_ptr->channels = 3;
2057 info_ptr->channels = 1;
2062 info_ptr->color_type = (png_byte)(info_ptr->color_type &
2064 info_ptr->num_trans = 0;
2068 if (info_ptr->color_type & PNG_COLOR_MASK_ALPHA)
2069 info_ptr->channels++;
2074 ((info_ptr->color_type == PNG_COLOR_TYPE_RGB) ||
2075 (info_ptr->color_type == PNG_COLOR_TYPE_GRAY)))
2077 info_ptr->channels++;
2080 info_ptr->color_type |= PNG_COLOR_MASK_ALPHA;
2088 if (info_ptr->bit_depth < png_ptr->user_transform_depth)
2089 info_ptr->bit_depth = png_ptr->user_transform_depth;
2091 if (info_ptr->channels < png_ptr->user_transform_channels)
2092 info_ptr->channels = png_ptr->user_transform_channels;
2096 info_ptr->pixel_depth = (png_byte)(info_ptr->channels *
2097 info_ptr->bit_depth);
2099 info_ptr->rowbytes = PNG_ROWBYTES(info_ptr->pixel_depth, info_ptr->width);
2107 png_ptr->info_rowbytes = info_ptr->rowbytes;