Lines Matching defs:row_info

2134 png_do_unpack(png_row_infop row_info, png_bytep row)
2138 if (row_info->bit_depth < 8)
2141 png_uint_32 row_width=row_info->width;
2143 switch (row_info->bit_depth)
2218 row_info->bit_depth = 8;
2219 row_info->pixel_depth = (png_byte)(8 * row_info->channels);
2220 row_info->rowbytes = row_width * row_info->channels;
2232 png_do_unshift(png_row_infop row_info, png_bytep row,
2240 color_type = row_info->color_type;
2246 int bit_depth = row_info->bit_depth;
2296 png_bytep bp_end = bp + row_info->rowbytes;
2311 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;
2371 png_do_scale_16_to_8(png_row_infop row_info, png_bytep row)
2375 if (row_info->bit_depth == 16)
2379 png_bytep ep = sp + row_info->rowbytes; /* end+1 */
2420 row_info->bit_depth = 8;
2421 row_info->pixel_depth = (png_byte)(8 * row_info->channels);
2422 row_info->rowbytes = row_info->width * row_info->channels;
2432 png_do_chop(png_row_infop row_info, png_bytep row)
2436 if (row_info->bit_depth == 16)
2440 png_bytep ep = sp + row_info->rowbytes; /* end+1 */
2448 row_info->bit_depth = 8;
2449 row_info->pixel_depth = (png_byte)(8 * row_info->channels);
2450 row_info->rowbytes = row_info->width * row_info->channels;
2457 png_do_read_swap_alpha(png_row_infop row_info, png_bytep row)
2462 png_uint_32 row_width = row_info->width;
2463 if (row_info->color_type == PNG_COLOR_TYPE_RGB_ALPHA)
2466 if (row_info->bit_depth == 8)
2468 png_bytep sp = row + row_info->rowbytes;
2487 png_bytep sp = row + row_info->rowbytes;
2509 else if (row_info->color_type == PNG_COLOR_TYPE_GRAY_ALPHA)
2512 if (row_info->bit_depth == 8)
2514 png_bytep sp = row + row_info->rowbytes;
2531 png_bytep sp = row + row_info->rowbytes;
2554 png_do_read_invert_alpha(png_row_infop row_info, png_bytep row)
2559 row_width = row_info->width;
2560 if (row_info->color_type == PNG_COLOR_TYPE_RGB_ALPHA)
2562 if (row_info->bit_depth == 8)
2565 png_bytep sp = row + row_info->rowbytes;
2588 png_bytep sp = row + row_info->rowbytes;
2612 else if (row_info->color_type == PNG_COLOR_TYPE_GRAY_ALPHA)
2614 if (row_info->bit_depth == 8)
2617 png_bytep sp = row + row_info->rowbytes;
2632 png_bytep sp = row + row_info->rowbytes;
2656 png_do_read_filler(png_row_infop row_info, png_bytep row,
2660 png_uint_32 row_width = row_info->width;
2670 row_info->color_type == PNG_COLOR_TYPE_GRAY)
2672 if (row_info->bit_depth == 8)
2685 row_info->channels = 2;
2686 row_info->pixel_depth = 16;
2687 row_info->rowbytes = row_width * 2;
2700 row_info->channels = 2;
2701 row_info->pixel_depth = 16;
2702 row_info->rowbytes = row_width * 2;
2707 else if (row_info->bit_depth == 16)
2723 row_info->channels = 2;
2724 row_info->pixel_depth = 32;
2725 row_info->rowbytes = row_width * 4;
2740 row_info->channels = 2;
2741 row_info->pixel_depth = 32;
2742 row_info->rowbytes = row_width * 4;
2747 else if (row_info->color_type == PNG_COLOR_TYPE_RGB)
2749 if (row_info->bit_depth == 8)
2764 row_info->channels = 4;
2765 row_info->pixel_depth = 32;
2766 row_info->rowbytes = row_width * 4;
2781 row_info->channels = 4;
2782 row_info->pixel_depth = 32;
2783 row_info->rowbytes = row_width * 4;
2788 else if (row_info->bit_depth == 16)
2808 row_info->channels = 4;
2809 row_info->pixel_depth = 64;
2810 row_info->rowbytes = row_width * 8;
2830 row_info->channels = 4;
2831 row_info->pixel_depth = 64;
2832 row_info->rowbytes = row_width * 8;
2843 png_do_gray_to_rgb(png_row_infop row_info, png_bytep row)
2846 png_uint_32 row_width = row_info->width;
2850 if (row_info->bit_depth >= 8 &&
2851 !(row_info->color_type & PNG_COLOR_MASK_COLOR))
2853 if (row_info->color_type == PNG_COLOR_TYPE_GRAY)
2855 if (row_info->bit_depth == 8)
2885 else if (row_info->color_type == PNG_COLOR_TYPE_GRAY_ALPHA)
2887 if (row_info->bit_depth == 8)
2919 row_info->channels = (png_byte)(row_info->channels + 2);
2920 row_info->color_type |= PNG_COLOR_MASK_COLOR;
2921 row_info->pixel_depth = (png_byte)(row_info->channels *
2922 row_info->bit_depth);
2923 row_info->rowbytes = PNG_ROWBYTES(row_info->pixel_depth, row_width);
2982 png_do_rgb_to_gray(png_structrp png_ptr, png_row_infop row_info, png_bytep row)
2989 if (!(row_info->color_type & PNG_COLOR_MASK_PALETTE) &&
2990 (row_info->color_type & PNG_COLOR_MASK_COLOR))
2995 PNG_CONST png_uint_32 row_width = row_info->width;
2997 (row_info->color_type & PNG_COLOR_MASK_ALPHA) != 0;
2999 if (row_info->bit_depth == 8)
3165 row_info->channels = (png_byte)(row_info->channels - 2);
3166 row_info->color_type = (png_byte)(row_info->color_type &
3168 row_info->pixel_depth = (png_byte)(row_info->channels *
3169 row_info->bit_depth);
3170 row_info->rowbytes = PNG_ROWBYTES(row_info->pixel_depth, row_width);
3183 png_do_compose(png_row_infop row_info, png_bytep row, png_structrp png_ptr)
3198 png_uint_32 row_width = row_info->width;
3204 switch (row_info->color_type)
3208 switch (row_info->bit_depth)
3455 if (row_info->bit_depth == 8)
3497 else /* if (row_info->bit_depth == 16) */
3582 if (row_info->bit_depth == 8)
3707 if (row_info->bit_depth == 8)
3782 else /* if (row_info->bit_depth == 16) */
3923 png_do_gamma(png_row_infop row_info, png_bytep row, png_structrp png_ptr)
3931 png_uint_32 row_width=row_info->width;
3935 if (((row_info->bit_depth <= 8 && gamma_table != NULL) ||
3936 (row_info->bit_depth == 16 && gamma_16_table != NULL)))
3938 switch (row_info->color_type)
3942 if (row_info->bit_depth == 8)
3956 else /* if (row_info->bit_depth == 16) */
3984 if (row_info->bit_depth == 8)
4002 else /* if (row_info->bit_depth == 16) */
4028 if (row_info->bit_depth == 8)
4038 else /* if (row_info->bit_depth == 16) */
4054 if (row_info->bit_depth == 2)
4073 if (row_info->bit_depth == 4)
4087 else if (row_info->bit_depth == 8)
4097 else if (row_info->bit_depth == 16)
4124 png_do_encode_alpha(png_row_infop row_info, png_bytep row, png_structrp png_ptr)
4126 png_uint_32 row_width = row_info->width;
4130 if (row_info->color_type & PNG_COLOR_MASK_ALPHA)
4132 if (row_info->bit_depth == 8)
4139 (row_info->color_type & PNG_COLOR_MASK_COLOR) ? 4 : 2;
4151 else if (row_info->bit_depth == 16)
4159 (row_info->color_type & PNG_COLOR_MASK_COLOR) ? 8 : 4;
4178 /* Only get to here if called with a weird row_info; no harm has been done,
4190 png_do_expand_palette(png_row_infop row_info, png_bytep row,
4196 png_uint_32 row_width=row_info->width;
4200 if (row_info->color_type == PNG_COLOR_TYPE_PALETTE)
4202 if (row_info->bit_depth < 8)
4204 switch (row_info->bit_depth)
4282 row_info->bit_depth = 8;
4283 row_info->pixel_depth = 8;
4284 row_info->rowbytes = row_width;
4287 if (row_info->bit_depth == 8)
4308 row_info->bit_depth = 8;
4309 row_info->pixel_depth = 32;
4310 row_info->rowbytes = row_width * 4;
4311 row_info->color_type = 6;
4312 row_info->channels = 4;
4328 row_info->bit_depth = 8;
4329 row_info->pixel_depth = 24;
4330 row_info->rowbytes = row_width * 3;
4331 row_info->color_type = 2;
4332 row_info->channels = 3;
4343 png_do_expand(png_row_infop row_info, png_bytep row,
4349 png_uint_32 row_width=row_info->width;
4354 if (row_info->color_type == PNG_COLOR_TYPE_GRAY)
4358 if (row_info->bit_depth < 8)
4360 switch (row_info->bit_depth)
4443 row_info->bit_depth = 8;
4444 row_info->pixel_depth = 8;
4445 row_info->rowbytes = row_width;
4450 if (row_info->bit_depth == 8)
4468 else if (row_info->bit_depth == 16)
4472 sp = row + row_info->rowbytes - 1;
4473 dp = row + (row_info->rowbytes << 1) - 1;
4493 row_info->color_type = PNG_COLOR_TYPE_GRAY_ALPHA;
4494 row_info->channels = 2;
4495 row_info->pixel_depth = (png_byte)(row_info->bit_depth << 1);
4496 row_info->rowbytes = PNG_ROWBYTES(row_info->pixel_depth,
4500 else if (row_info->color_type == PNG_COLOR_TYPE_RGB && trans_color)
4502 if (row_info->bit_depth == 8)
4507 sp = row + (png_size_t)row_info->rowbytes - 1;
4522 else if (row_info->bit_depth == 16)
4530 sp = row + row_info->rowbytes - 1;
4559 row_info->color_type = PNG_COLOR_TYPE_RGB_ALPHA;
4560 row_info->channels = 4;
4561 row_info->pixel_depth = (png_byte)(row_info->bit_depth << 2);
4562 row_info->rowbytes = PNG_ROWBYTES(row_info->pixel_depth, row_width);
4573 png_do_expand_16(png_row_infop row_info, png_bytep row)
4575 if (row_info->bit_depth == 8 &&
4576 row_info->color_type != PNG_COLOR_TYPE_PALETTE)
4587 png_byte *sp = row + row_info->rowbytes; /* source, last byte + 1 */
4588 png_byte *dp = sp + row_info->rowbytes; /* destination, end + 1 */
4592 row_info->rowbytes *= 2;
4593 row_info->bit_depth = 16;
4594 row_info->pixel_depth = (png_byte)(row_info->channels * 16);
4601 png_do_quantize(png_row_infop row_info, png_bytep row,
4606 png_uint_32 row_width=row_info->width;
4610 if (row_info->bit_depth == 8)
4612 if (row_info->color_type == PNG_COLOR_TYPE_RGB && palette_lookup)
4642 row_info->color_type = PNG_COLOR_TYPE_PALETTE;
4643 row_info->channels = 1;
4644 row_info->pixel_depth = row_info->bit_depth;
4645 row_info->rowbytes = PNG_ROWBYTES(row_info->pixel_depth, row_width);
4648 else if (row_info->color_type == PNG_COLOR_TYPE_RGB_ALPHA &&
4673 row_info->color_type = PNG_COLOR_TYPE_PALETTE;
4674 row_info->channels = 1;
4675 row_info->pixel_depth = row_info->bit_depth;
4676 row_info->rowbytes = PNG_ROWBYTES(row_info->pixel_depth, row_width);
4679 else if (row_info->color_type == PNG_COLOR_TYPE_PALETTE &&
4698 png_do_read_transformations(png_structrp png_ptr, png_row_infop row_info)
4730 if (row_info->color_type == PNG_COLOR_TYPE_PALETTE)
4732 png_do_expand_palette(row_info, png_ptr->row_buf + 1,
4740 png_do_expand(row_info, png_ptr->row_buf + 1,
4744 png_do_expand(row_info, png_ptr->row_buf + 1,
4753 (row_info->color_type == PNG_COLOR_TYPE_RGB_ALPHA ||
4754 row_info->color_type == PNG_COLOR_TYPE_GRAY_ALPHA))
4755 png_do_strip_channel(row_info, png_ptr->row_buf + 1,
4763 png_do_rgb_to_gray(png_ptr, row_info,
4817 png_do_gray_to_rgb(row_info, png_ptr->row_buf + 1);
4823 png_do_compose(row_info, png_ptr->row_buf + 1, png_ptr);
4845 png_do_gamma(row_info, png_ptr->row_buf + 1, png_ptr);
4851 (row_info->color_type == PNG_COLOR_TYPE_RGB_ALPHA ||
4852 row_info->color_type == PNG_COLOR_TYPE_GRAY_ALPHA))
4853 png_do_strip_channel(row_info, png_ptr->row_buf + 1,
4859 (row_info->color_type & PNG_COLOR_MASK_ALPHA))
4860 png_do_encode_alpha(row_info, png_ptr->row_buf + 1, png_ptr);
4865 png_do_scale_16_to_8(row_info, png_ptr->row_buf + 1);
4874 png_do_chop(row_info, png_ptr->row_buf + 1);
4880 png_do_quantize(row_info, png_ptr->row_buf + 1,
4883 if (row_info->rowbytes == 0)
4895 png_do_expand_16(row_info, png_ptr->row_buf + 1);
4902 png_do_gray_to_rgb(row_info, png_ptr->row_buf + 1);
4907 png_do_invert(row_info, png_ptr->row_buf + 1);
4912 png_do_read_invert_alpha(row_info, png_ptr->row_buf + 1);
4917 png_do_unshift(row_info, png_ptr->row_buf + 1,
4923 png_do_unpack(row_info, png_ptr->row_buf + 1);
4928 if (row_info->color_type == PNG_COLOR_TYPE_PALETTE &&
4930 png_do_check_palette_indexes(png_ptr, row_info);
4935 png_do_bgr(row_info, png_ptr->row_buf + 1);
4940 png_do_packswap(row_info, png_ptr->row_buf + 1);
4945 png_do_read_filler(row_info, png_ptr->row_buf + 1,
4951 png_do_read_swap_alpha(row_info, png_ptr->row_buf + 1);
4957 png_do_swap(row_info, png_ptr->row_buf + 1);
4967 row_info, /* row_info: */
4977 row_info->bit_depth = png_ptr->user_transform_depth;
4980 row_info->channels = png_ptr->user_transform_channels;
4982 row_info->pixel_depth = (png_byte)(row_info->bit_depth *
4983 row_info->channels);
4985 row_info->rowbytes = PNG_ROWBYTES(row_info->pixel_depth, row_info->width);