Lines Matching defs:row_info
2152 png_do_unpack(png_row_infop row_info, png_bytep row)
2156 if (row_info->bit_depth < 8)
2159 png_uint_32 row_width=row_info->width;
2161 switch (row_info->bit_depth)
2236 row_info->bit_depth = 8;
2237 row_info->pixel_depth = (png_byte)(8 * row_info->channels);
2238 row_info->rowbytes = row_width * row_info->channels;
2250 png_do_unshift(png_row_infop row_info, png_bytep row,
2258 color_type = row_info->color_type;
2264 int bit_depth = row_info->bit_depth;
2314 png_bytep bp_end = bp + row_info->rowbytes;
2329 png_bytep bp_end = bp + row_info->rowbytes;
2347 png_bytep bp_end = bp + row_info->rowbytes;
2365 png_bytep bp_end = bp + row_info->rowbytes;
2389 png_do_scale_16_to_8(png_row_infop row_info, png_bytep row)
2393 if (row_info->bit_depth == 16)
2397 png_bytep ep = sp + row_info->rowbytes; /* end+1 */
2438 row_info->bit_depth = 8;
2439 row_info->pixel_depth = (png_byte)(8 * row_info->channels);
2440 row_info->rowbytes = row_info->width * row_info->channels;
2450 png_do_chop(png_row_infop row_info, png_bytep row)
2454 if (row_info->bit_depth == 16)
2458 png_bytep ep = sp + row_info->rowbytes; /* end+1 */
2466 row_info->bit_depth = 8;
2467 row_info->pixel_depth = (png_byte)(8 * row_info->channels);
2468 row_info->rowbytes = row_info->width * row_info->channels;
2475 png_do_read_swap_alpha(png_row_infop row_info, png_bytep row)
2477 png_uint_32 row_width = row_info->width;
2481 if (row_info->color_type == PNG_COLOR_TYPE_RGB_ALPHA)
2484 if (row_info->bit_depth == 8)
2486 png_bytep sp = row + row_info->rowbytes;
2505 png_bytep sp = row + row_info->rowbytes;
2527 else if (row_info->color_type == PNG_COLOR_TYPE_GRAY_ALPHA)
2530 if (row_info->bit_depth == 8)
2532 png_bytep sp = row + row_info->rowbytes;
2549 png_bytep sp = row + row_info->rowbytes;
2571 png_do_read_invert_alpha(png_row_infop row_info, png_bytep row)
2576 row_width = row_info->width;
2577 if (row_info->color_type == PNG_COLOR_TYPE_RGB_ALPHA)
2579 if (row_info->bit_depth == 8)
2582 png_bytep sp = row + row_info->rowbytes;
2605 png_bytep sp = row + row_info->rowbytes;
2629 else if (row_info->color_type == PNG_COLOR_TYPE_GRAY_ALPHA)
2631 if (row_info->bit_depth == 8)
2634 png_bytep sp = row + row_info->rowbytes;
2649 png_bytep sp = row + row_info->rowbytes;
2673 png_do_read_filler(png_row_infop row_info, png_bytep row,
2677 png_uint_32 row_width = row_info->width;
2687 row_info->color_type == PNG_COLOR_TYPE_GRAY)
2689 if (row_info->bit_depth == 8)
2702 row_info->channels = 2;
2703 row_info->pixel_depth = 16;
2704 row_info->rowbytes = row_width * 2;
2717 row_info->channels = 2;
2718 row_info->pixel_depth = 16;
2719 row_info->rowbytes = row_width * 2;
2724 else if (row_info->bit_depth == 16)
2740 row_info->channels = 2;
2741 row_info->pixel_depth = 32;
2742 row_info->rowbytes = row_width * 4;
2757 row_info->channels = 2;
2758 row_info->pixel_depth = 32;
2759 row_info->rowbytes = row_width * 4;
2764 else if (row_info->color_type == PNG_COLOR_TYPE_RGB)
2766 if (row_info->bit_depth == 8)
2781 row_info->channels = 4;
2782 row_info->pixel_depth = 32;
2783 row_info->rowbytes = row_width * 4;
2798 row_info->channels = 4;
2799 row_info->pixel_depth = 32;
2800 row_info->rowbytes = row_width * 4;
2805 else if (row_info->bit_depth == 16)
2825 row_info->channels = 4;
2826 row_info->pixel_depth = 64;
2827 row_info->rowbytes = row_width * 8;
2847 row_info->channels = 4;
2848 row_info->pixel_depth = 64;
2849 row_info->rowbytes = row_width * 8;
2860 png_do_gray_to_rgb(png_row_infop row_info, png_bytep row)
2863 png_uint_32 row_width = row_info->width;
2867 if (row_info->bit_depth >= 8 &&
2868 (row_info->color_type & PNG_COLOR_MASK_COLOR) == 0)
2870 if (row_info->color_type == PNG_COLOR_TYPE_GRAY)
2872 if (row_info->bit_depth == 8)
2902 else if (row_info->color_type == PNG_COLOR_TYPE_GRAY_ALPHA)
2904 if (row_info->bit_depth == 8)
2936 row_info->channels = (png_byte)(row_info->channels + 2);
2937 row_info->color_type |= PNG_COLOR_MASK_COLOR;
2938 row_info->pixel_depth = (png_byte)(row_info->channels *
2939 row_info->bit_depth);
2940 row_info->rowbytes = PNG_ROWBYTES(row_info->pixel_depth, row_width);
2999 png_do_rgb_to_gray(png_structrp png_ptr, png_row_infop row_info, png_bytep row)
3005 if ((row_info->color_type & PNG_COLOR_MASK_PALETTE) == 0 &&
3006 (row_info->color_type & PNG_COLOR_MASK_COLOR) != 0)
3011 png_uint_32 row_width = row_info->width;
3012 int have_alpha = (row_info->color_type & PNG_COLOR_MASK_ALPHA) != 0;
3014 if (row_info->bit_depth == 8)
3182 row_info->channels = (png_byte)(row_info->channels - 2);
3183 row_info->color_type = (png_byte)(row_info->color_type &
3185 row_info->pixel_depth = (png_byte)(row_info->channels *
3186 row_info->bit_depth);
3187 row_info->rowbytes = PNG_ROWBYTES(row_info->pixel_depth, row_width);
3200 png_do_compose(png_row_infop row_info, png_bytep row, png_structrp png_ptr)
3215 png_uint_32 row_width = row_info->width;
3220 switch (row_info->color_type)
3224 switch (row_info->bit_depth)
3476 if (row_info->bit_depth == 8)
3518 else /* if (row_info->bit_depth == 16) */
3603 if (row_info->bit_depth == 8)
3729 if (row_info->bit_depth == 8)
3804 else /* if (row_info->bit_depth == 16) */
3944 png_do_gamma(png_row_infop row_info, png_bytep row, png_structrp png_ptr)
3952 png_uint_32 row_width=row_info->width;
3956 if (((row_info->bit_depth <= 8 && gamma_table != NULL) ||
3957 (row_info->bit_depth == 16 && gamma_16_table != NULL)))
3959 switch (row_info->color_type)
3963 if (row_info->bit_depth == 8)
3977 else /* if (row_info->bit_depth == 16) */
4005 if (row_info->bit_depth == 8)
4023 else /* if (row_info->bit_depth == 16) */
4049 if (row_info->bit_depth == 8)
4059 else /* if (row_info->bit_depth == 16) */
4075 if (row_info->bit_depth == 2)
4094 if (row_info->bit_depth == 4)
4108 else if (row_info->bit_depth == 8)
4118 else if (row_info->bit_depth == 16)
4145 png_do_encode_alpha(png_row_infop row_info, png_bytep row, png_structrp png_ptr)
4147 png_uint_32 row_width = row_info->width;
4151 if ((row_info->color_type & PNG_COLOR_MASK_ALPHA) != 0)
4153 if (row_info->bit_depth == 8)
4159 int step = (row_info->color_type & PNG_COLOR_MASK_COLOR) ? 4 : 2;
4171 else if (row_info->bit_depth == 16)
4178 int step = (row_info->color_type & PNG_COLOR_MASK_COLOR) ? 8 : 4;
4197 /* Only get to here if called with a weird row_info; no harm has been done,
4209 png_do_expand_palette(png_structrp png_ptr, png_row_infop row_info,
4216 png_uint_32 row_width=row_info->width;
4220 if (row_info->color_type == PNG_COLOR_TYPE_PALETTE)
4222 if (row_info->bit_depth < 8)
4224 switch (row_info->bit_depth)
4302 row_info->bit_depth = 8;
4303 row_info->pixel_depth = 8;
4304 row_info->rowbytes = row_width;
4307 if (row_info->bit_depth == 8)
4320 * but sometimes row_info->bit_depth has been changed to 8.
4323 i = png_do_expand_palette_rgba8_neon(png_ptr, row_info, row,
4341 row_info->bit_depth = 8;
4342 row_info->pixel_depth = 32;
4343 row_info->rowbytes = row_width * 4;
4344 row_info->color_type = 6;
4345 row_info->channels = 4;
4354 i = png_do_expand_palette_rgb8_neon(png_ptr, row_info, row,
4368 row_info->bit_depth = 8;
4369 row_info->pixel_depth = 24;
4370 row_info->rowbytes = row_width * 3;
4371 row_info->color_type = 2;
4372 row_info->channels = 3;
4383 png_do_expand(png_row_infop row_info, png_bytep row,
4389 png_uint_32 row_width=row_info->width;
4393 if (row_info->color_type == PNG_COLOR_TYPE_GRAY)
4397 if (row_info->bit_depth < 8)
4399 switch (row_info->bit_depth)
4482 row_info->bit_depth = 8;
4483 row_info->pixel_depth = 8;
4484 row_info->rowbytes = row_width;
4489 if (row_info->bit_depth == 8)
4507 else if (row_info->bit_depth == 16)
4511 sp = row + row_info->rowbytes - 1;
4512 dp = row + (row_info->rowbytes << 1) - 1;
4533 row_info->color_type = PNG_COLOR_TYPE_GRAY_ALPHA;
4534 row_info->channels = 2;
4535 row_info->pixel_depth = (png_byte)(row_info->bit_depth << 1);
4536 row_info->rowbytes = PNG_ROWBYTES(row_info->pixel_depth,
4540 else if (row_info->color_type == PNG_COLOR_TYPE_RGB &&
4543 if (row_info->bit_depth == 8)
4548 sp = row + (size_t)row_info->rowbytes - 1;
4563 else if (row_info->bit_depth == 16)
4571 sp = row + row_info->rowbytes - 1;
4600 row_info->color_type = PNG_COLOR_TYPE_RGB_ALPHA;
4601 row_info->channels = 4;
4602 row_info->pixel_depth = (png_byte)(row_info->bit_depth << 2);
4603 row_info->rowbytes = PNG_ROWBYTES(row_info->pixel_depth, row_width);
4613 png_do_expand_16(png_row_infop row_info, png_bytep row)
4615 if (row_info->bit_depth == 8 &&
4616 row_info->color_type != PNG_COLOR_TYPE_PALETTE)
4627 png_byte *sp = row + row_info->rowbytes; /* source, last byte + 1 */
4628 png_byte *dp = sp + row_info->rowbytes; /* destination, end + 1 */
4634 row_info->rowbytes *= 2;
4635 row_info->bit_depth = 16;
4636 row_info->pixel_depth = (png_byte)(row_info->channels * 16);
4643 png_do_quantize(png_row_infop row_info, png_bytep row,
4648 png_uint_32 row_width=row_info->width;
4652 if (row_info->bit_depth == 8)
4654 if (row_info->color_type == PNG_COLOR_TYPE_RGB && palette_lookup)
4684 row_info->color_type = PNG_COLOR_TYPE_PALETTE;
4685 row_info->channels = 1;
4686 row_info->pixel_depth = row_info->bit_depth;
4687 row_info->rowbytes = PNG_ROWBYTES(row_info->pixel_depth, row_width);
4690 else if (row_info->color_type == PNG_COLOR_TYPE_RGB_ALPHA &&
4715 row_info->color_type = PNG_COLOR_TYPE_PALETTE;
4716 row_info->channels = 1;
4717 row_info->pixel_depth = row_info->bit_depth;
4718 row_info->rowbytes = PNG_ROWBYTES(row_info->pixel_depth, row_width);
4721 else if (row_info->color_type == PNG_COLOR_TYPE_PALETTE &&
4740 png_do_read_transformations(png_structrp png_ptr, png_row_infop row_info)
4772 if (row_info->color_type == PNG_COLOR_TYPE_PALETTE)
4786 png_do_expand_palette(png_ptr, row_info, png_ptr->row_buf + 1,
4794 png_do_expand(row_info, png_ptr->row_buf + 1,
4798 png_do_expand(row_info, png_ptr->row_buf + 1, NULL);
4806 (row_info->color_type == PNG_COLOR_TYPE_RGB_ALPHA ||
4807 row_info->color_type == PNG_COLOR_TYPE_GRAY_ALPHA))
4808 png_do_strip_channel(row_info, png_ptr->row_buf + 1,
4816 png_do_rgb_to_gray(png_ptr, row_info,
4870 png_do_gray_to_rgb(row_info, png_ptr->row_buf + 1);
4876 png_do_compose(row_info, png_ptr->row_buf + 1, png_ptr);
4898 png_do_gamma(row_info, png_ptr->row_buf + 1, png_ptr);
4904 (row_info->color_type == PNG_COLOR_TYPE_RGB_ALPHA ||
4905 row_info->color_type == PNG_COLOR_TYPE_GRAY_ALPHA))
4906 png_do_strip_channel(row_info, png_ptr->row_buf + 1,
4912 (row_info->color_type & PNG_COLOR_MASK_ALPHA) != 0)
4913 png_do_encode_alpha(row_info, png_ptr->row_buf + 1, png_ptr);
4918 png_do_scale_16_to_8(row_info, png_ptr->row_buf + 1);
4927 png_do_chop(row_info, png_ptr->row_buf + 1);
4933 png_do_quantize(row_info, png_ptr->row_buf + 1,
4936 if (row_info->rowbytes == 0)
4948 png_do_expand_16(row_info, png_ptr->row_buf + 1);
4955 png_do_gray_to_rgb(row_info, png_ptr->row_buf + 1);
4960 png_do_invert(row_info, png_ptr->row_buf + 1);
4965 png_do_read_invert_alpha(row_info, png_ptr->row_buf + 1);
4970 png_do_unshift(row_info, png_ptr->row_buf + 1,
4976 png_do_unpack(row_info, png_ptr->row_buf + 1);
4981 if (row_info->color_type == PNG_COLOR_TYPE_PALETTE &&
4983 png_do_check_palette_indexes(png_ptr, row_info);
4988 png_do_bgr(row_info, png_ptr->row_buf + 1);
4993 png_do_packswap(row_info, png_ptr->row_buf + 1);
4998 png_do_read_filler(row_info, png_ptr->row_buf + 1,
5004 png_do_read_swap_alpha(row_info, png_ptr->row_buf + 1);
5010 png_do_swap(row_info, png_ptr->row_buf + 1);
5020 row_info, /* row_info: */
5030 row_info->bit_depth = png_ptr->user_transform_depth;
5033 row_info->channels = png_ptr->user_transform_channels;
5035 row_info->pixel_depth = (png_byte)(row_info->bit_depth *
5036 row_info->channels);
5038 row_info->rowbytes = PNG_ROWBYTES(row_info->pixel_depth, row_info->width);