Home | History | Annotate | Download | only in libpng

Lines Matching full:info_ptr

1926 png_read_transform_info(png_structrp png_ptr, png_inforp info_ptr)
1933 if (info_ptr->color_type == PNG_COLOR_TYPE_PALETTE)
1940 info_ptr->color_type = PNG_COLOR_TYPE_RGB_ALPHA;
1943 info_ptr->color_type = PNG_COLOR_TYPE_RGB;
1945 info_ptr->bit_depth = 8;
1946 info_ptr->num_trans = 0;
1956 info_ptr->color_type |= PNG_COLOR_MASK_ALPHA;
1958 if (info_ptr->bit_depth < 8)
1959 info_ptr->bit_depth = 8;
1961 info_ptr->num_trans = 0;
1972 info_ptr->background = png_ptr->background;
1981 * TODO: this looks wrong; the info_ptr should end up with a gamma equal to
1983 * the info_ptr is used by the app after the rows have been read.
1985 info_ptr->colorspace.gamma = png_ptr->colorspace.gamma;
1988 if (info_ptr->bit_depth == 16)
1993 info_ptr->bit_depth = 8;
1998 info_ptr->bit_depth = 8;
2012 info_ptr->bit_depth = 8;
2017 info_ptr->bit_depth = 8;
2028 info_ptr->color_type = (png_byte)(info_ptr->color_type |
2034 info_ptr->color_type = (png_byte)(info_ptr->color_type &
2041 if (((info_ptr->color_type == PNG_COLOR_TYPE_RGB) ||
2042 (info_ptr->color_type == PNG_COLOR_TYPE_RGB_ALPHA)) &&
2043 png_ptr->palette_lookup != 0 && info_ptr->bit_depth == 8)
2045 info_ptr->color_type = PNG_COLOR_TYPE_PALETTE;
2052 info_ptr->bit_depth == 8 &&
2053 info_ptr->color_type != PNG_COLOR_TYPE_PALETTE)
2055 info_ptr->bit_depth = 16;
2061 (info_ptr->bit_depth < 8))
2062 info_ptr->bit_depth = 8;
2065 if (info_ptr->color_type == PNG_COLOR_TYPE_PALETTE)
2066 info_ptr->channels = 1;
2068 else if ((info_ptr->color_type & PNG_COLOR_MASK_COLOR) != 0)
2069 info_ptr->channels = 3;
2072 info_ptr->channels = 1;
2077 info_ptr->color_type = (png_byte)(info_ptr->color_type &
2079 info_ptr->num_trans = 0;
2083 if ((info_ptr->color_type & PNG_COLOR_MASK_ALPHA) != 0)
2084 info_ptr->channels++;
2089 (info_ptr->color_type == PNG_COLOR_TYPE_RGB ||
2090 info_ptr->color_type == PNG_COLOR_TYPE_GRAY))
2092 info_ptr->channels++;
2095 info_ptr->color_type |= PNG_COLOR_MASK_ALPHA;
2104 info_ptr->bit_depth = png_ptr->user_transform_depth;
2107 info_ptr->channels = png_ptr->user_transform_channels;
2111 info_ptr->pixel_depth = (png_byte)(info_ptr->channels *
2112 info_ptr->bit_depth);
2114 info_ptr->rowbytes = PNG_ROWBYTES(info_ptr->pixel_depth, info_ptr->width);
2122 png_ptr->info_rowbytes = info_ptr->rowbytes;