Lines Matching refs:row_info
2080 png_do_read_transformations(png_structp png_ptr, png_row_infop row_info) in png_do_read_transformations() argument
2111 if (row_info->color_type == PNG_COLOR_TYPE_PALETTE) in png_do_read_transformations()
2113 png_do_expand_palette(row_info, png_ptr->row_buf + 1, in png_do_read_transformations()
2121 png_do_expand(row_info, png_ptr->row_buf + 1, in png_do_read_transformations()
2125 png_do_expand(row_info, png_ptr->row_buf + 1, in png_do_read_transformations()
2134 (row_info->color_type == PNG_COLOR_TYPE_RGB_ALPHA || in png_do_read_transformations()
2135 row_info->color_type == PNG_COLOR_TYPE_GRAY_ALPHA)) in png_do_read_transformations()
2136 png_do_strip_channel(row_info, png_ptr->row_buf + 1, in png_do_read_transformations()
2144 png_do_rgb_to_gray(png_ptr, row_info, in png_do_read_transformations()
2198 png_do_gray_to_rgb(row_info, png_ptr->row_buf + 1); in png_do_read_transformations()
2204 png_do_compose(row_info, png_ptr->row_buf + 1, png_ptr); in png_do_read_transformations()
2226 png_do_gamma(row_info, png_ptr->row_buf + 1, png_ptr); in png_do_read_transformations()
2232 (row_info->color_type == PNG_COLOR_TYPE_RGB_ALPHA || in png_do_read_transformations()
2233 row_info->color_type == PNG_COLOR_TYPE_GRAY_ALPHA)) in png_do_read_transformations()
2234 png_do_strip_channel(row_info, png_ptr->row_buf + 1, in png_do_read_transformations()
2240 (row_info->color_type & PNG_COLOR_MASK_ALPHA)) in png_do_read_transformations()
2241 png_do_encode_alpha(row_info, png_ptr->row_buf + 1, png_ptr); in png_do_read_transformations()
2246 png_do_scale_16_to_8(row_info, png_ptr->row_buf + 1); in png_do_read_transformations()
2255 png_do_chop(row_info, png_ptr->row_buf + 1); in png_do_read_transformations()
2261 png_do_quantize(row_info, png_ptr->row_buf + 1, in png_do_read_transformations()
2264 if (row_info->rowbytes == 0) in png_do_read_transformations()
2276 png_do_expand_16(row_info, png_ptr->row_buf + 1); in png_do_read_transformations()
2283 png_do_gray_to_rgb(row_info, png_ptr->row_buf + 1); in png_do_read_transformations()
2288 png_do_invert(row_info, png_ptr->row_buf + 1); in png_do_read_transformations()
2293 png_do_unshift(row_info, png_ptr->row_buf + 1, in png_do_read_transformations()
2299 png_do_unpack(row_info, png_ptr->row_buf + 1); in png_do_read_transformations()
2304 if (row_info->color_type == PNG_COLOR_TYPE_PALETTE && in png_do_read_transformations()
2306 png_do_check_palette_indexes(png_ptr, row_info); in png_do_read_transformations()
2311 png_do_bgr(row_info, png_ptr->row_buf + 1); in png_do_read_transformations()
2316 png_do_packswap(row_info, png_ptr->row_buf + 1); in png_do_read_transformations()
2321 png_do_read_filler(row_info, png_ptr->row_buf + 1, in png_do_read_transformations()
2327 png_do_read_invert_alpha(row_info, png_ptr->row_buf + 1); in png_do_read_transformations()
2332 png_do_read_swap_alpha(row_info, png_ptr->row_buf + 1); in png_do_read_transformations()
2338 png_do_swap(row_info, png_ptr->row_buf + 1); in png_do_read_transformations()
2348 row_info, /* row_info: */ in png_do_read_transformations()
2358 row_info->bit_depth = png_ptr->user_transform_depth; in png_do_read_transformations()
2361 row_info->channels = png_ptr->user_transform_channels; in png_do_read_transformations()
2363 row_info->pixel_depth = (png_byte)(row_info->bit_depth * in png_do_read_transformations()
2364 row_info->channels); in png_do_read_transformations()
2366 row_info->rowbytes = PNG_ROWBYTES(row_info->pixel_depth, row_info->width); in png_do_read_transformations()
2379 png_do_unpack(png_row_infop row_info, png_bytep row) in png_do_unpack() argument
2383 if (row_info->bit_depth < 8) in png_do_unpack()
2386 png_uint_32 row_width=row_info->width; in png_do_unpack()
2388 switch (row_info->bit_depth) in png_do_unpack()
2463 row_info->bit_depth = 8; in png_do_unpack()
2464 row_info->pixel_depth = (png_byte)(8 * row_info->channels); in png_do_unpack()
2465 row_info->rowbytes = row_width * row_info->channels; in png_do_unpack()
2477 png_do_unshift(png_row_infop row_info, png_bytep row, in png_do_unshift() argument
2485 color_type = row_info->color_type; in png_do_unshift()
2491 int bit_depth = row_info->bit_depth; in png_do_unshift()
2541 png_bytep bp_end = bp + row_info->rowbytes; in png_do_unshift()
2556 png_bytep bp_end = bp + row_info->rowbytes; in png_do_unshift()
2574 png_bytep bp_end = bp + row_info->rowbytes; in png_do_unshift()
2592 png_bytep bp_end = bp + row_info->rowbytes; in png_do_unshift()
2616 png_do_scale_16_to_8(png_row_infop row_info, png_bytep row) in png_do_scale_16_to_8() argument
2620 if (row_info->bit_depth == 16) in png_do_scale_16_to_8()
2624 png_bytep ep = sp + row_info->rowbytes; /* end+1 */ in png_do_scale_16_to_8()
2665 row_info->bit_depth = 8; in png_do_scale_16_to_8()
2666 row_info->pixel_depth = (png_byte)(8 * row_info->channels); in png_do_scale_16_to_8()
2667 row_info->rowbytes = row_info->width * row_info->channels; in png_do_scale_16_to_8()
2677 png_do_chop(png_row_infop row_info, png_bytep row) in png_do_chop() argument
2681 if (row_info->bit_depth == 16) in png_do_chop()
2685 png_bytep ep = sp + row_info->rowbytes; /* end+1 */ in png_do_chop()
2693 row_info->bit_depth = 8; in png_do_chop()
2694 row_info->pixel_depth = (png_byte)(8 * row_info->channels); in png_do_chop()
2695 row_info->rowbytes = row_info->width * row_info->channels; in png_do_chop()
2702 png_do_read_swap_alpha(png_row_infop row_info, png_bytep row) in png_do_read_swap_alpha() argument
2707 png_uint_32 row_width = row_info->width; in png_do_read_swap_alpha()
2708 if (row_info->color_type == PNG_COLOR_TYPE_RGB_ALPHA) in png_do_read_swap_alpha()
2711 if (row_info->bit_depth == 8) in png_do_read_swap_alpha()
2713 png_bytep sp = row + row_info->rowbytes; in png_do_read_swap_alpha()
2732 png_bytep sp = row + row_info->rowbytes; in png_do_read_swap_alpha()
2754 else if (row_info->color_type == PNG_COLOR_TYPE_GRAY_ALPHA) in png_do_read_swap_alpha()
2757 if (row_info->bit_depth == 8) in png_do_read_swap_alpha()
2759 png_bytep sp = row + row_info->rowbytes; in png_do_read_swap_alpha()
2776 png_bytep sp = row + row_info->rowbytes; in png_do_read_swap_alpha()
2799 png_do_read_invert_alpha(png_row_infop row_info, png_bytep row) in png_do_read_invert_alpha() argument
2804 row_width = row_info->width; in png_do_read_invert_alpha()
2805 if (row_info->color_type == PNG_COLOR_TYPE_RGB_ALPHA) in png_do_read_invert_alpha()
2807 if (row_info->bit_depth == 8) in png_do_read_invert_alpha()
2810 png_bytep sp = row + row_info->rowbytes; in png_do_read_invert_alpha()
2833 png_bytep sp = row + row_info->rowbytes; in png_do_read_invert_alpha()
2857 else if (row_info->color_type == PNG_COLOR_TYPE_GRAY_ALPHA) in png_do_read_invert_alpha()
2859 if (row_info->bit_depth == 8) in png_do_read_invert_alpha()
2862 png_bytep sp = row + row_info->rowbytes; in png_do_read_invert_alpha()
2877 png_bytep sp = row + row_info->rowbytes; in png_do_read_invert_alpha()
2901 png_do_read_filler(png_row_infop row_info, png_bytep row, in png_do_read_filler() argument
2905 png_uint_32 row_width = row_info->width; in png_do_read_filler()
2915 row_info->color_type == PNG_COLOR_TYPE_GRAY) in png_do_read_filler()
2917 if (row_info->bit_depth == 8) in png_do_read_filler()
2930 row_info->channels = 2; in png_do_read_filler()
2931 row_info->pixel_depth = 16; in png_do_read_filler()
2932 row_info->rowbytes = row_width * 2; in png_do_read_filler()
2945 row_info->channels = 2; in png_do_read_filler()
2946 row_info->pixel_depth = 16; in png_do_read_filler()
2947 row_info->rowbytes = row_width * 2; in png_do_read_filler()
2952 else if (row_info->bit_depth == 16) in png_do_read_filler()
2968 row_info->channels = 2; in png_do_read_filler()
2969 row_info->pixel_depth = 32; in png_do_read_filler()
2970 row_info->rowbytes = row_width * 4; in png_do_read_filler()
2985 row_info->channels = 2; in png_do_read_filler()
2986 row_info->pixel_depth = 32; in png_do_read_filler()
2987 row_info->rowbytes = row_width * 4; in png_do_read_filler()
2992 else if (row_info->color_type == PNG_COLOR_TYPE_RGB) in png_do_read_filler()
2994 if (row_info->bit_depth == 8) in png_do_read_filler()
3009 row_info->channels = 4; in png_do_read_filler()
3010 row_info->pixel_depth = 32; in png_do_read_filler()
3011 row_info->rowbytes = row_width * 4; in png_do_read_filler()
3026 row_info->channels = 4; in png_do_read_filler()
3027 row_info->pixel_depth = 32; in png_do_read_filler()
3028 row_info->rowbytes = row_width * 4; in png_do_read_filler()
3033 else if (row_info->bit_depth == 16) in png_do_read_filler()
3053 row_info->channels = 4; in png_do_read_filler()
3054 row_info->pixel_depth = 64; in png_do_read_filler()
3055 row_info->rowbytes = row_width * 8; in png_do_read_filler()
3075 row_info->channels = 4; in png_do_read_filler()
3076 row_info->pixel_depth = 64; in png_do_read_filler()
3077 row_info->rowbytes = row_width * 8; in png_do_read_filler()
3088 png_do_gray_to_rgb(png_row_infop row_info, png_bytep row) in png_do_gray_to_rgb() argument
3091 png_uint_32 row_width = row_info->width; in png_do_gray_to_rgb()
3095 if (row_info->bit_depth >= 8 && in png_do_gray_to_rgb()
3096 !(row_info->color_type & PNG_COLOR_MASK_COLOR)) in png_do_gray_to_rgb()
3098 if (row_info->color_type == PNG_COLOR_TYPE_GRAY) in png_do_gray_to_rgb()
3100 if (row_info->bit_depth == 8) in png_do_gray_to_rgb()
3130 else if (row_info->color_type == PNG_COLOR_TYPE_GRAY_ALPHA) in png_do_gray_to_rgb()
3132 if (row_info->bit_depth == 8) in png_do_gray_to_rgb()
3164 row_info->channels = (png_byte)(row_info->channels + 2); in png_do_gray_to_rgb()
3165 row_info->color_type |= PNG_COLOR_MASK_COLOR; in png_do_gray_to_rgb()
3166 row_info->pixel_depth = (png_byte)(row_info->channels * in png_do_gray_to_rgb()
3167 row_info->bit_depth); in png_do_gray_to_rgb()
3168 row_info->rowbytes = PNG_ROWBYTES(row_info->pixel_depth, row_width); in png_do_gray_to_rgb()
3227 png_do_rgb_to_gray(png_structp png_ptr, png_row_infop row_info, png_bytep row) in png_do_rgb_to_gray() argument
3234 if (!(row_info->color_type & PNG_COLOR_MASK_PALETTE) && in png_do_rgb_to_gray()
3235 (row_info->color_type & PNG_COLOR_MASK_COLOR)) in png_do_rgb_to_gray()
3240 PNG_CONST png_uint_32 row_width = row_info->width; in png_do_rgb_to_gray()
3242 (row_info->color_type & PNG_COLOR_MASK_ALPHA) != 0; in png_do_rgb_to_gray()
3244 if (row_info->bit_depth == 8) in png_do_rgb_to_gray()
3410 row_info->channels = (png_byte)(row_info->channels - 2); in png_do_rgb_to_gray()
3411 row_info->color_type = (png_byte)(row_info->color_type & in png_do_rgb_to_gray()
3413 row_info->pixel_depth = (png_byte)(row_info->channels * in png_do_rgb_to_gray()
3414 row_info->bit_depth); in png_do_rgb_to_gray()
3415 row_info->rowbytes = PNG_ROWBYTES(row_info->pixel_depth, row_width); in png_do_rgb_to_gray()
3487 png_do_compose(png_row_infop row_info, png_bytep row, png_structp png_ptr) in png_do_compose() argument
3501 png_uint_32 row_width = row_info->width; in png_do_compose()
3508 switch (row_info->color_type) in png_do_compose()
3512 switch (row_info->bit_depth) in png_do_compose()
3752 if (row_info->bit_depth == 8) in png_do_compose()
3879 if (row_info->bit_depth == 8) in png_do_compose()
4004 if (row_info->bit_depth == 8) in png_do_compose()
4220 png_do_gamma(png_row_infop row_info, png_bytep row, png_structp png_ptr) in png_do_gamma() argument
4228 png_uint_32 row_width=row_info->width; in png_do_gamma()
4232 if (((row_info->bit_depth <= 8 && gamma_table != NULL) || in png_do_gamma()
4233 (row_info->bit_depth == 16 && gamma_16_table != NULL))) in png_do_gamma()
4235 switch (row_info->color_type) in png_do_gamma()
4239 if (row_info->bit_depth == 8) in png_do_gamma()
4281 if (row_info->bit_depth == 8) in png_do_gamma()
4325 if (row_info->bit_depth == 8) in png_do_gamma()
4351 if (row_info->bit_depth == 2) in png_do_gamma()
4370 if (row_info->bit_depth == 4) in png_do_gamma()
4384 else if (row_info->bit_depth == 8) in png_do_gamma()
4394 else if (row_info->bit_depth == 16) in png_do_gamma()
4421 png_do_encode_alpha(png_row_infop row_info, png_bytep row, png_structp png_ptr) in png_do_encode_alpha() argument
4423 png_uint_32 row_width = row_info->width; in png_do_encode_alpha()
4427 if (row_info->color_type & PNG_COLOR_MASK_ALPHA) in png_do_encode_alpha()
4429 if (row_info->bit_depth == 8) in png_do_encode_alpha()
4436 (row_info->color_type & PNG_COLOR_MASK_COLOR) ? 4 : 2; in png_do_encode_alpha()
4448 else if (row_info->bit_depth == 16) in png_do_encode_alpha()
4456 (row_info->color_type & PNG_COLOR_MASK_COLOR) ? 8 : 4; in png_do_encode_alpha()
4487 png_do_expand_palette(png_row_infop row_info, png_bytep row, in png_do_expand_palette() argument
4493 png_uint_32 row_width=row_info->width; in png_do_expand_palette()
4497 if (row_info->color_type == PNG_COLOR_TYPE_PALETTE) in png_do_expand_palette()
4499 if (row_info->bit_depth < 8) in png_do_expand_palette()
4501 switch (row_info->bit_depth) in png_do_expand_palette()
4579 row_info->bit_depth = 8; in png_do_expand_palette()
4580 row_info->pixel_depth = 8; in png_do_expand_palette()
4581 row_info->rowbytes = row_width; in png_do_expand_palette()
4584 if (row_info->bit_depth == 8) in png_do_expand_palette()
4605 row_info->bit_depth = 8; in png_do_expand_palette()
4606 row_info->pixel_depth = 32; in png_do_expand_palette()
4607 row_info->rowbytes = row_width * 4; in png_do_expand_palette()
4608 row_info->color_type = 6; in png_do_expand_palette()
4609 row_info->channels = 4; in png_do_expand_palette()
4625 row_info->bit_depth = 8; in png_do_expand_palette()
4626 row_info->pixel_depth = 24; in png_do_expand_palette()
4627 row_info->rowbytes = row_width * 3; in png_do_expand_palette()
4628 row_info->color_type = 2; in png_do_expand_palette()
4629 row_info->channels = 3; in png_do_expand_palette()
4640 png_do_expand(png_row_infop row_info, png_bytep row, in png_do_expand() argument
4646 png_uint_32 row_width=row_info->width; in png_do_expand()
4651 if (row_info->color_type == PNG_COLOR_TYPE_GRAY) in png_do_expand()
4655 if (row_info->bit_depth < 8) in png_do_expand()
4657 switch (row_info->bit_depth) in png_do_expand()
4740 row_info->bit_depth = 8; in png_do_expand()
4741 row_info->pixel_depth = 8; in png_do_expand()
4742 row_info->rowbytes = row_width; in png_do_expand()
4747 if (row_info->bit_depth == 8) in png_do_expand()
4765 else if (row_info->bit_depth == 16) in png_do_expand()
4769 sp = row + row_info->rowbytes - 1; in png_do_expand()
4770 dp = row + (row_info->rowbytes << 1) - 1; in png_do_expand()
4790 row_info->color_type = PNG_COLOR_TYPE_GRAY_ALPHA; in png_do_expand()
4791 row_info->channels = 2; in png_do_expand()
4792 row_info->pixel_depth = (png_byte)(row_info->bit_depth << 1); in png_do_expand()
4793 row_info->rowbytes = PNG_ROWBYTES(row_info->pixel_depth, in png_do_expand()
4797 else if (row_info->color_type == PNG_COLOR_TYPE_RGB && trans_color) in png_do_expand()
4799 if (row_info->bit_depth == 8) in png_do_expand()
4804 sp = row + (png_size_t)row_info->rowbytes - 1; in png_do_expand()
4819 else if (row_info->bit_depth == 16) in png_do_expand()
4827 sp = row + row_info->rowbytes - 1; in png_do_expand()
4856 row_info->color_type = PNG_COLOR_TYPE_RGB_ALPHA; in png_do_expand()
4857 row_info->channels = 4; in png_do_expand()
4858 row_info->pixel_depth = (png_byte)(row_info->bit_depth << 2); in png_do_expand()
4859 row_info->rowbytes = PNG_ROWBYTES(row_info->pixel_depth, row_width); in png_do_expand()
4870 png_do_expand_16(png_row_infop row_info, png_bytep row) in png_do_expand_16() argument
4872 if (row_info->bit_depth == 8 && in png_do_expand_16()
4873 row_info->color_type != PNG_COLOR_TYPE_PALETTE) in png_do_expand_16()
4884 png_byte *sp = row + row_info->rowbytes; /* source, last byte + 1 */ in png_do_expand_16()
4885 png_byte *dp = sp + row_info->rowbytes; /* destination, end + 1 */ in png_do_expand_16()
4889 row_info->rowbytes *= 2; in png_do_expand_16()
4890 row_info->bit_depth = 16; in png_do_expand_16()
4891 row_info->pixel_depth = (png_byte)(row_info->channels * 16); in png_do_expand_16()
4898 png_do_quantize(png_row_infop row_info, png_bytep row, in png_do_quantize() argument
4903 png_uint_32 row_width=row_info->width; in png_do_quantize()
4907 if (row_info->bit_depth == 8) in png_do_quantize()
4909 if (row_info->color_type == PNG_COLOR_TYPE_RGB && palette_lookup) in png_do_quantize()
4939 row_info->color_type = PNG_COLOR_TYPE_PALETTE; in png_do_quantize()
4940 row_info->channels = 1; in png_do_quantize()
4941 row_info->pixel_depth = row_info->bit_depth; in png_do_quantize()
4942 row_info->rowbytes = PNG_ROWBYTES(row_info->pixel_depth, row_width); in png_do_quantize()
4945 else if (row_info->color_type == PNG_COLOR_TYPE_RGB_ALPHA && in png_do_quantize()
4970 row_info->color_type = PNG_COLOR_TYPE_PALETTE; in png_do_quantize()
4971 row_info->channels = 1; in png_do_quantize()
4972 row_info->pixel_depth = row_info->bit_depth; in png_do_quantize()
4973 row_info->rowbytes = PNG_ROWBYTES(row_info->pixel_depth, row_width); in png_do_quantize()
4976 else if (row_info->color_type == PNG_COLOR_TYPE_PALETTE && in png_do_quantize()
4994 png_do_read_intrapixel(png_row_infop row_info, png_bytep row) in png_do_read_intrapixel() argument
4999 (row_info->color_type & PNG_COLOR_MASK_COLOR)) in png_do_read_intrapixel()
5002 png_uint_32 row_width = row_info->width; in png_do_read_intrapixel()
5004 if (row_info->bit_depth == 8) in png_do_read_intrapixel()
5009 if (row_info->color_type == PNG_COLOR_TYPE_RGB) in png_do_read_intrapixel()
5012 else if (row_info->color_type == PNG_COLOR_TYPE_RGB_ALPHA) in png_do_read_intrapixel()
5024 else if (row_info->bit_depth == 16) in png_do_read_intrapixel()
5029 if (row_info->color_type == PNG_COLOR_TYPE_RGB) in png_do_read_intrapixel()
5032 else if (row_info->color_type == PNG_COLOR_TYPE_RGB_ALPHA) in png_do_read_intrapixel()