Lines Matching defs:row_info

2120 png_do_read_transformations(png_structrp png_ptr, png_row_infop row_info)

2152 if (row_info->color_type == PNG_COLOR_TYPE_PALETTE)
2154 png_do_expand_palette(row_info, png_ptr->row_buf + 1,
2162 png_do_expand(row_info, png_ptr->row_buf + 1,
2166 png_do_expand(row_info, png_ptr->row_buf + 1,
2175 (row_info->color_type == PNG_COLOR_TYPE_RGB_ALPHA ||
2176 row_info->color_type == PNG_COLOR_TYPE_GRAY_ALPHA))
2177 png_do_strip_channel(row_info, png_ptr->row_buf + 1,
2185 png_do_rgb_to_gray(png_ptr, row_info,
2239 png_do_gray_to_rgb(row_info, png_ptr->row_buf + 1);
2245 png_do_compose(row_info, png_ptr->row_buf + 1, png_ptr);
2267 png_do_gamma(row_info, png_ptr->row_buf + 1, png_ptr);
2273 (row_info->color_type == PNG_COLOR_TYPE_RGB_ALPHA ||
2274 row_info->color_type == PNG_COLOR_TYPE_GRAY_ALPHA))
2275 png_do_strip_channel(row_info, png_ptr->row_buf + 1,
2281 (row_info->color_type & PNG_COLOR_MASK_ALPHA))
2282 png_do_encode_alpha(row_info, png_ptr->row_buf + 1, png_ptr);
2287 png_do_scale_16_to_8(row_info, png_ptr->row_buf + 1);
2296 png_do_chop(row_info, png_ptr->row_buf + 1);
2302 png_do_quantize(row_info, png_ptr->row_buf + 1,
2305 if (row_info->rowbytes == 0)
2317 png_do_expand_16(row_info, png_ptr->row_buf + 1);
2324 png_do_gray_to_rgb(row_info, png_ptr->row_buf + 1);
2329 png_do_invert(row_info, png_ptr->row_buf + 1);
2334 png_do_unshift(row_info, png_ptr->row_buf + 1,
2340 png_do_unpack(row_info, png_ptr->row_buf + 1);
2345 if (row_info->color_type == PNG_COLOR_TYPE_PALETTE &&
2347 png_do_check_palette_indexes(png_ptr, row_info);
2352 png_do_bgr(row_info, png_ptr->row_buf + 1);
2357 png_do_packswap(row_info, png_ptr->row_buf + 1);
2362 png_do_read_filler(row_info, png_ptr->row_buf + 1,
2368 png_do_read_invert_alpha(row_info, png_ptr->row_buf + 1);
2373 png_do_read_swap_alpha(row_info, png_ptr->row_buf + 1);
2379 png_do_swap(row_info, png_ptr->row_buf + 1);
2389 row_info, /* row_info: */
2399 row_info->bit_depth = png_ptr->user_transform_depth;
2402 row_info->channels = png_ptr->user_transform_channels;
2404 row_info->pixel_depth = (png_byte)(row_info->bit_depth *
2405 row_info->channels);
2407 row_info->rowbytes = PNG_ROWBYTES(row_info->pixel_depth, row_info->width);
2420 png_do_unpack(png_row_infop row_info, png_bytep row)
2424 if (row_info->bit_depth < 8)
2427 png_uint_32 row_width=row_info->width;
2429 switch (row_info->bit_depth)
2504 row_info->bit_depth = 8;
2505 row_info->pixel_depth = (png_byte)(8 * row_info->channels);
2506 row_info->rowbytes = row_width * row_info->channels;
2518 png_do_unshift(png_row_infop row_info, png_bytep row,
2526 color_type = row_info->color_type;
2532 int bit_depth = row_info->bit_depth;
2582 png_bytep bp_end = bp + row_info->rowbytes;
2597 png_bytep bp_end = bp + row_info->rowbytes;
2615 png_bytep bp_end = bp + row_info->rowbytes;
2633 png_bytep bp_end = bp + row_info->rowbytes;
2657 png_do_scale_16_to_8(png_row_infop row_info, png_bytep row)
2661 if (row_info->bit_depth == 16)
2665 png_bytep ep = sp + row_info->rowbytes; /* end+1 */
2706 row_info->bit_depth = 8;
2707 row_info->pixel_depth = (png_byte)(8 * row_info->channels);
2708 row_info->rowbytes = row_info->width * row_info->channels;
2718 png_do_chop(png_row_infop row_info, png_bytep row)
2722 if (row_info->bit_depth == 16)
2726 png_bytep ep = sp + row_info->rowbytes; /* end+1 */
2734 row_info->bit_depth = 8;
2735 row_info->pixel_depth = (png_byte)(8 * row_info->channels);
2736 row_info->rowbytes = row_info->width * row_info->channels;
2743 png_do_read_swap_alpha(png_row_infop row_info, png_bytep row)
2748 png_uint_32 row_width = row_info->width;
2749 if (row_info->color_type == PNG_COLOR_TYPE_RGB_ALPHA)
2752 if (row_info->bit_depth == 8)
2754 png_bytep sp = row + row_info->rowbytes;
2773 png_bytep sp = row + row_info->rowbytes;
2795 else if (row_info->color_type == PNG_COLOR_TYPE_GRAY_ALPHA)
2798 if (row_info->bit_depth == 8)
2800 png_bytep sp = row + row_info->rowbytes;
2817 png_bytep sp = row + row_info->rowbytes;
2840 png_do_read_invert_alpha(png_row_infop row_info, png_bytep row)
2845 row_width = row_info->width;
2846 if (row_info->color_type == PNG_COLOR_TYPE_RGB_ALPHA)
2848 if (row_info->bit_depth == 8)
2851 png_bytep sp = row + row_info->rowbytes;
2874 png_bytep sp = row + row_info->rowbytes;
2898 else if (row_info->color_type == PNG_COLOR_TYPE_GRAY_ALPHA)
2900 if (row_info->bit_depth == 8)
2903 png_bytep sp = row + row_info->rowbytes;
2918 png_bytep sp = row + row_info->rowbytes;
2942 png_do_read_filler(png_row_infop row_info, png_bytep row,
2946 png_uint_32 row_width = row_info->width;
2956 row_info->color_type == PNG_COLOR_TYPE_GRAY)
2958 if (row_info->bit_depth == 8)
2971 row_info->channels = 2;
2972 row_info->pixel_depth = 16;
2973 row_info->rowbytes = row_width * 2;
2986 row_info->channels = 2;
2987 row_info->pixel_depth = 16;
2988 row_info->rowbytes = row_width * 2;
2993 else if (row_info->bit_depth == 16)
3009 row_info->channels = 2;
3010 row_info->pixel_depth = 32;
3011 row_info->rowbytes = row_width * 4;
3026 row_info->channels = 2;
3027 row_info->pixel_depth = 32;
3028 row_info->rowbytes = row_width * 4;
3033 else if (row_info->color_type == PNG_COLOR_TYPE_RGB)
3035 if (row_info->bit_depth == 8)
3050 row_info->channels = 4;
3051 row_info->pixel_depth = 32;
3052 row_info->rowbytes = row_width * 4;
3067 row_info->channels = 4;
3068 row_info->pixel_depth = 32;
3069 row_info->rowbytes = row_width * 4;
3074 else if (row_info->bit_depth == 16)
3094 row_info->channels = 4;
3095 row_info->pixel_depth = 64;
3096 row_info->rowbytes = row_width * 8;
3116 row_info->channels = 4;
3117 row_info->pixel_depth = 64;
3118 row_info->rowbytes = row_width * 8;
3129 png_do_gray_to_rgb(png_row_infop row_info, png_bytep row)
3132 png_uint_32 row_width = row_info->width;
3136 if (row_info->bit_depth >= 8 &&
3137 !(row_info->color_type & PNG_COLOR_MASK_COLOR))
3139 if (row_info->color_type == PNG_COLOR_TYPE_GRAY)
3141 if (row_info->bit_depth == 8)
3171 else if (row_info->color_type == PNG_COLOR_TYPE_GRAY_ALPHA)
3173 if (row_info->bit_depth == 8)
3205 row_info->channels = (png_byte)(row_info->channels + 2);
3206 row_info->color_type |= PNG_COLOR_MASK_COLOR;
3207 row_info->pixel_depth = (png_byte)(row_info->channels *
3208 row_info->bit_depth);
3209 row_info->rowbytes = PNG_ROWBYTES(row_info->pixel_depth, row_width);
3268 png_do_rgb_to_gray(png_structrp png_ptr, png_row_infop row_info, png_bytep row)
3275 if (!(row_info->color_type & PNG_COLOR_MASK_PALETTE) &&
3276 (row_info->color_type & PNG_COLOR_MASK_COLOR))
3281 PNG_CONST png_uint_32 row_width = row_info->width;
3283 (row_info->color_type & PNG_COLOR_MASK_ALPHA) != 0;
3285 if (row_info->bit_depth == 8)
3451 row_info->channels = (png_byte)(row_info->channels - 2);
3452 row_info->color_type = (png_byte)(row_info->color_type &
3454 row_info->pixel_depth = (png_byte)(row_info->channels *
3455 row_info->bit_depth);
3456 row_info->rowbytes = PNG_ROWBYTES(row_info->pixel_depth, row_width);
3528 png_do_compose(png_row_infop row_info, png_bytep row, png_structrp png_ptr)
3543 png_uint_32 row_width = row_info->width;
3549 switch (row_info->color_type)
3553 switch (row_info->bit_depth)
3800 if (row_info->bit_depth == 8)
3842 else /* if (row_info->bit_depth == 16) */
3927 if (row_info->bit_depth == 8)
4052 if (row_info->bit_depth == 8)
4127 else /* if (row_info->bit_depth == 16) */
4268 png_do_gamma(png_row_infop row_info, png_bytep row, png_structrp png_ptr)
4276 png_uint_32 row_width=row_info->width;
4280 if (((row_info->bit_depth <= 8 && gamma_table != NULL) ||
4281 (row_info->bit_depth == 16 && gamma_16_table != NULL)))
4283 switch (row_info->color_type)
4287 if (row_info->bit_depth == 8)
4301 else /* if (row_info->bit_depth == 16) */
4329 if (row_info->bit_depth == 8)
4347 else /* if (row_info->bit_depth == 16) */
4373 if (row_info->bit_depth == 8)
4383 else /* if (row_info->bit_depth == 16) */
4399 if (row_info->bit_depth == 2)
4418 if (row_info->bit_depth == 4)
4432 else if (row_info->bit_depth == 8)
4442 else if (row_info->bit_depth == 16)
4469 png_do_encode_alpha(png_row_infop row_info, png_bytep row, png_structrp png_ptr)
4471 png_uint_32 row_width = row_info->width;
4475 if (row_info->color_type & PNG_COLOR_MASK_ALPHA)
4477 if (row_info->bit_depth == 8)
4484 (row_info->color_type & PNG_COLOR_MASK_COLOR) ? 4 : 2;
4496 else if (row_info->bit_depth == 16)
4504 (row_info->color_type & PNG_COLOR_MASK_COLOR) ? 8 : 4;
4523 /* Only get to here if called with a weird row_info; no harm has been done,
4535 png_do_expand_palette(png_row_infop row_info, png_bytep row,
4541 png_uint_32 row_width=row_info->width;
4545 if (row_info->color_type == PNG_COLOR_TYPE_PALETTE)
4547 if (row_info->bit_depth < 8)
4549 switch (row_info->bit_depth)
4627 row_info->bit_depth = 8;
4628 row_info->pixel_depth = 8;
4629 row_info->rowbytes = row_width;
4632 if (row_info->bit_depth == 8)
4653 row_info->bit_depth = 8;
4654 row_info->pixel_depth = 32;
4655 row_info->rowbytes = row_width * 4;
4656 row_info->color_type = 6;
4657 row_info->channels = 4;
4673 row_info->bit_depth = 8;
4674 row_info->pixel_depth = 24;
4675 row_info->rowbytes = row_width * 3;
4676 row_info->color_type = 2;
4677 row_info->channels = 3;
4688 png_do_expand(png_row_infop row_info, png_bytep row,
4694 png_uint_32 row_width=row_info->width;
4699 if (row_info->color_type == PNG_COLOR_TYPE_GRAY)
4703 if (row_info->bit_depth < 8)
4705 switch (row_info->bit_depth)
4788 row_info->bit_depth = 8;
4789 row_info->pixel_depth = 8;
4790 row_info->rowbytes = row_width;
4795 if (row_info->bit_depth == 8)
4813 else if (row_info->bit_depth == 16)
4817 sp = row + row_info->rowbytes - 1;
4818 dp = row + (row_info->rowbytes << 1) - 1;
4838 row_info->color_type = PNG_COLOR_TYPE_GRAY_ALPHA;
4839 row_info->channels = 2;
4840 row_info->pixel_depth = (png_byte)(row_info->bit_depth << 1);
4841 row_info->rowbytes = PNG_ROWBYTES(row_info->pixel_depth,
4845 else if (row_info->color_type == PNG_COLOR_TYPE_RGB && trans_color)
4847 if (row_info->bit_depth == 8)
4852 sp = row + (png_size_t)row_info->rowbytes - 1;
4867 else if (row_info->bit_depth == 16)
4875 sp = row + row_info->rowbytes - 1;
4904 row_info->color_type = PNG_COLOR_TYPE_RGB_ALPHA;
4905 row_info->channels = 4;
4906 row_info->pixel_depth = (png_byte)(row_info->bit_depth << 2);
4907 row_info->rowbytes = PNG_ROWBYTES(row_info->pixel_depth, row_width);
4918 png_do_expand_16(png_row_infop row_info, png_bytep row)
4920 if (row_info->bit_depth == 8 &&
4921 row_info->color_type != PNG_COLOR_TYPE_PALETTE)
4932 png_byte *sp = row + row_info->rowbytes; /* source, last byte + 1 */
4933 png_byte *dp = sp + row_info->rowbytes; /* destination, end + 1 */
4937 row_info->rowbytes *= 2;
4938 row_info->bit_depth = 16;
4939 row_info->pixel_depth = (png_byte)(row_info->channels * 16);
4946 png_do_quantize(png_row_infop row_info, png_bytep row,
4951 png_uint_32 row_width=row_info->width;
4955 if (row_info->bit_depth == 8)
4957 if (row_info->color_type == PNG_COLOR_TYPE_RGB && palette_lookup)
4987 row_info->color_type = PNG_COLOR_TYPE_PALETTE;
4988 row_info->channels = 1;
4989 row_info->pixel_depth = row_info->bit_depth;
4990 row_info->rowbytes = PNG_ROWBYTES(row_info->pixel_depth, row_width);
4993 else if (row_info->color_type == PNG_COLOR_TYPE_RGB_ALPHA &&
5018 row_info->color_type = PNG_COLOR_TYPE_PALETTE;
5019 row_info->channels = 1;
5020 row_info->pixel_depth = row_info->bit_depth;
5021 row_info->rowbytes = PNG_ROWBYTES(row_info->pixel_depth, row_width);
5024 else if (row_info->color_type == PNG_COLOR_TYPE_PALETTE &&
5042 png_do_read_intrapixel(png_row_infop row_info, png_bytep row)
5047 (row_info->color_type & PNG_COLOR_MASK_COLOR))
5050 png_uint_32 row_width = row_info->width;
5052 if (row_info->bit_depth == 8)
5057 if (row_info->color_type == PNG_COLOR_TYPE_RGB)
5060 else if (row_info->color_type == PNG_COLOR_TYPE_RGB_ALPHA)
5072 else if (row_info->bit_depth == 16)
5077 if (row_info->color_type == PNG_COLOR_TYPE_RGB)
5080 else if (row_info->color_type == PNG_COLOR_TYPE_RGB_ALPHA)