Lines Matching refs:row_info

1374       if (png_ptr->row_info.color_type == PNG_COLOR_TYPE_PALETTE)
1376 png_do_expand_palette(&(png_ptr->row_info), png_ptr->row_buf + 1,
1383 png_do_expand(&(png_ptr->row_info), png_ptr->row_buf + 1,
1386 png_do_expand(&(png_ptr->row_info), png_ptr->row_buf + 1,
1394 png_do_strip_filler(&(png_ptr->row_info), png_ptr->row_buf + 1,
1402 png_do_rgb_to_gray(png_ptr, &(png_ptr->row_info),
1454 png_do_gray_to_rgb(&(png_ptr->row_info), png_ptr->row_buf + 1);
1461 png_do_background(&(png_ptr->row_info), png_ptr->row_buf + 1,
1481 png_do_gamma(&(png_ptr->row_info), png_ptr->row_buf + 1,
1488 png_do_chop(&(png_ptr->row_info), png_ptr->row_buf + 1);
1494 png_do_dither((png_row_infop)&(png_ptr->row_info), png_ptr->row_buf + 1,
1496 if (png_ptr->row_info.rowbytes == (png_uint_32)0)
1503 png_do_invert(&(png_ptr->row_info), png_ptr->row_buf + 1);
1508 png_do_unshift(&(png_ptr->row_info), png_ptr->row_buf + 1,
1514 png_do_unpack(&(png_ptr->row_info), png_ptr->row_buf + 1);
1519 png_do_bgr(&(png_ptr->row_info), png_ptr->row_buf + 1);
1524 png_do_packswap(&(png_ptr->row_info), png_ptr->row_buf + 1);
1531 png_do_gray_to_rgb(&(png_ptr->row_info), png_ptr->row_buf + 1);
1536 png_do_read_filler(&(png_ptr->row_info), png_ptr->row_buf + 1,
1542 png_do_read_invert_alpha(&(png_ptr->row_info), png_ptr->row_buf + 1);
1547 png_do_read_swap_alpha(&(png_ptr->row_info), png_ptr->row_buf + 1);
1552 png_do_swap(&(png_ptr->row_info), png_ptr->row_buf + 1);
1561 &(png_ptr->row_info), /* row_info: */
1571 png_ptr->row_info.bit_depth = png_ptr->user_transform_depth;
1573 png_ptr->row_info.channels = png_ptr->user_transform_channels;
1575 png_ptr->row_info.pixel_depth = (png_byte)(png_ptr->row_info.bit_depth *
1576 png_ptr->row_info.channels);
1577 png_ptr->row_info.rowbytes = PNG_ROWBYTES(png_ptr->row_info.pixel_depth,
1578 png_ptr->row_info.width);
1592 png_do_unpack(png_row_infop row_info, png_bytep row)
1597 if (row != NULL && row_info != NULL && row_info->bit_depth < 8)
1599 if (row_info->bit_depth < 8)
1603 png_uint_32 row_width=row_info->width;
1605 switch (row_info->bit_depth)
1671 row_info->bit_depth = 8;
1672 row_info->pixel_depth = (png_byte)(8 * row_info->channels);
1673 row_info->rowbytes = row_width * row_info->channels;
1685 png_do_unshift(png_row_infop row_info, png_bytep row, png_color_8p sig_bits)
1691 row != NULL && row_info != NULL && sig_bits != NULL &&
1693 row_info->color_type != PNG_COLOR_TYPE_PALETTE)
1699 png_uint_32 row_width = row_info->width;
1701 if (row_info->color_type & PNG_COLOR_MASK_COLOR)
1703 shift[channels++] = row_info->bit_depth - sig_bits->red;
1704 shift[channels++] = row_info->bit_depth - sig_bits->green;
1705 shift[channels++] = row_info->bit_depth - sig_bits->blue;
1709 shift[channels++] = row_info->bit_depth - sig_bits->gray;
1711 if (row_info->color_type & PNG_COLOR_MASK_ALPHA)
1713 shift[channels++] = row_info->bit_depth - sig_bits->alpha;
1727 switch (row_info->bit_depth)
1733 png_uint_32 istop = row_info->rowbytes;
1747 png_uint_32 istop = row_info->rowbytes;
1795 png_do_chop(png_row_infop row_info, png_bytep row)
1800 if (row != NULL && row_info != NULL && row_info->bit_depth == 16)
1802 if (row_info->bit_depth == 16)
1808 png_uint_32 istop = row_info->width * row_info->channels;
1844 row_info->bit_depth = 8;
1845 row_info->pixel_depth = (png_byte)(8 * row_info->channels);
1846 row_info->rowbytes = row_info->width * row_info->channels;
1853 png_do_read_swap_alpha(png_row_infop row_info, png_bytep row)
1858 if (row != NULL && row_info != NULL)
1861 png_uint_32 row_width = row_info->width;
1862 if (row_info->color_type == PNG_COLOR_TYPE_RGB_ALPHA)
1865 if (row_info->bit_depth == 8)
1867 png_bytep sp = row + row_info->rowbytes;
1884 png_bytep sp = row + row_info->rowbytes;
1904 else if (row_info->color_type == PNG_COLOR_TYPE_GRAY_ALPHA)
1907 if (row_info->bit_depth == 8)
1909 png_bytep sp = row + row_info->rowbytes;
1924 png_bytep sp = row + row_info->rowbytes;
1946 png_do_read_invert_alpha(png_row_infop row_info, png_bytep row)
1951 if (row != NULL && row_info != NULL)
1954 png_uint_32 row_width = row_info->width;
1955 if (row_info->color_type == PNG_COLOR_TYPE_RGB_ALPHA)
1958 if (row_info->bit_depth == 8)
1960 png_bytep sp = row + row_info->rowbytes;
1981 png_bytep sp = row + row_info->rowbytes;
2004 else if (row_info->color_type == PNG_COLOR_TYPE_GRAY_ALPHA)
2007 if (row_info->bit_depth == 8)
2009 png_bytep sp = row + row_info->rowbytes;
2022 png_bytep sp = row + row_info->rowbytes;
2046 png_do_read_filler(png_row_infop row_info, png_bytep row,
2050 png_uint_32 row_width = row_info->width;
2059 row != NULL && row_info != NULL &&
2061 row_info->color_type == PNG_COLOR_TYPE_GRAY)
2063 if (row_info->bit_depth == 8)
2076 row_info->channels = 2;
2077 row_info->pixel_depth = 16;
2078 row_info->rowbytes = row_width * 2;
2090 row_info->channels = 2;
2091 row_info->pixel_depth = 16;
2092 row_info->rowbytes = row_width * 2;
2095 else if (row_info->bit_depth == 16)
2111 row_info->channels = 2;
2112 row_info->pixel_depth = 32;
2113 row_info->rowbytes = row_width * 4;
2127 row_info->channels = 2;
2128 row_info->pixel_depth = 32;
2129 row_info->rowbytes = row_width * 4;
2133 else if (row_info->color_type == PNG_COLOR_TYPE_RGB)
2135 if (row_info->bit_depth == 8)
2150 row_info->channels = 4;
2151 row_info->pixel_depth = 32;
2152 row_info->rowbytes = row_width * 4;
2166 row_info->channels = 4;
2167 row_info->pixel_depth = 32;
2168 row_info->rowbytes = row_width * 4;
2171 else if (row_info->bit_depth == 16)
2191 row_info->channels = 4;
2192 row_info->pixel_depth = 64;
2193 row_info->rowbytes = row_width * 8;
2211 row_info->channels = 4;
2212 row_info->pixel_depth = 64;
2213 row_info->rowbytes = row_width * 8;
2223 png_do_gray_to_rgb(png_row_infop row_info, png_bytep row)
2226 png_uint_32 row_width = row_info->width;
2230 if (row_info->bit_depth >= 8 &&
2232 row != NULL && row_info != NULL &&
2234 !(row_info->color_type & PNG_COLOR_MASK_COLOR))
2236 if (row_info->color_type == PNG_COLOR_TYPE_GRAY)
2238 if (row_info->bit_depth == 8)
2264 else if (row_info->color_type == PNG_COLOR_TYPE_GRAY_ALPHA)
2266 if (row_info->bit_depth == 8)
2295 row_info->channels += (png_byte)2;
2296 row_info->color_type |= PNG_COLOR_MASK_COLOR;
2297 row_info->pixel_depth = (png_byte)(row_info->channels *
2298 row_info->bit_depth);
2299 row_info->rowbytes = PNG_ROWBYTES(row_info->pixel_depth, row_width);
2327 png_do_rgb_to_gray(png_structp png_ptr, png_row_infop row_info, png_bytep row)
2332 png_uint_32 row_width = row_info->width;
2339 row != NULL && row_info != NULL &&
2341 (row_info->color_type & PNG_COLOR_MASK_COLOR))
2347 if (row_info->color_type == PNG_COLOR_TYPE_RGB)
2349 if (row_info->bit_depth == 8)
2453 if (row_info->color_type == PNG_COLOR_TYPE_RGB_ALPHA)
2455 if (row_info->bit_depth == 8)
2553 row_info->channels -= (png_byte)2;
2554 row_info->color_type &= ~PNG_COLOR_MASK_COLOR;
2555 row_info->pixel_depth = (png_byte)(row_info->channels *
2556 row_info->bit_depth);
2557 row_info->rowbytes = PNG_ROWBYTES(row_info->pixel_depth, row_width);
2808 png_do_background(png_row_infop row_info, png_bytep row,
2820 png_uint_32 row_width=row_info->width;
2827 row != NULL && row_info != NULL &&
2829 (!(row_info->color_type & PNG_COLOR_MASK_ALPHA) ||
2830 (row_info->color_type != PNG_COLOR_TYPE_PALETTE && trans_values)))
2832 switch (row_info->color_type)
2836 switch (row_info->bit_depth)
3057 if (row_info->bit_depth == 8)
3098 else /* if (row_info->bit_depth == 16) */
3162 if (row_info->bit_depth == 8)
3305 if (row_info->bit_depth == 8)
3378 else /* if (row_info->bit_depth == 16) */
3485 if (row_info->color_type & PNG_COLOR_MASK_ALPHA)
3487 row_info->color_type &= ~PNG_COLOR_MASK_ALPHA;
3488 row_info->channels--;
3489 row_info->pixel_depth = (png_byte)(row_info->channels *
3490 row_info->bit_depth);
3491 row_info->rowbytes = PNG_ROWBYTES(row_info->pixel_depth, row_width);
3505 png_do_gamma(png_row_infop row_info, png_bytep row,
3511 png_uint_32 row_width=row_info->width;
3517 row != NULL && row_info != NULL &&
3519 ((row_info->bit_depth <= 8 && gamma_table != NULL) ||
3520 (row_info->bit_depth == 16 && gamma_16_table != NULL)))
3522 switch (row_info->color_type)
3526 if (row_info->bit_depth == 8)
3539 else /* if (row_info->bit_depth == 16) */
3565 if (row_info->bit_depth == 8)
3579 else /* if (row_info->bit_depth == 16) */
3603 if (row_info->bit_depth == 8)
3612 else /* if (row_info->bit_depth == 16) */
3628 if (row_info->bit_depth == 2)
3647 if (row_info->bit_depth == 4)
3661 else if (row_info->bit_depth == 8)
3671 else if (row_info->bit_depth == 16)
3694 png_do_expand_palette(png_row_infop row_info, png_bytep row,
3700 png_uint_32 row_width=row_info->width;
3706 row != NULL && row_info != NULL &&
3708 row_info->color_type == PNG_COLOR_TYPE_PALETTE)
3710 if (row_info->bit_depth < 8)
3712 switch (row_info->bit_depth)
3782 row_info->bit_depth = 8;
3783 row_info->pixel_depth = 8;
3784 row_info->rowbytes = row_width;
3786 switch (row_info->bit_depth)
3806 row_info->bit_depth = 8;
3807 row_info->pixel_depth = 32;
3808 row_info->rowbytes = row_width * 4;
3809 row_info->color_type = 6;
3810 row_info->channels = 4;
3825 row_info->bit_depth = 8;
3826 row_info->pixel_depth = 24;
3827 row_info->rowbytes = row_width * 3;
3828 row_info->color_type = 2;
3829 row_info->channels = 3;
3841 png_do_expand(png_row_infop row_info, png_bytep row,
3847 png_uint_32 row_width=row_info->width;
3852 if (row != NULL && row_info != NULL)
3855 if (row_info->color_type == PNG_COLOR_TYPE_GRAY)
3859 if (row_info->bit_depth < 8)
3861 switch (row_info->bit_depth)
3936 row_info->bit_depth = 8;
3937 row_info->pixel_depth = 8;
3938 row_info->rowbytes = row_width;
3943 if (row_info->bit_depth == 8)
3958 else if (row_info->bit_depth == 16)
3962 sp = row + row_info->rowbytes - 1;
3963 dp = row + (row_info->rowbytes << 1) - 1;
3981 row_info->color_type = PNG_COLOR_TYPE_GRAY_ALPHA;
3982 row_info->channels = 2;
3983 row_info->pixel_depth = (png_byte)(row_info->bit_depth << 1);
3984 row_info->rowbytes = PNG_ROWBYTES(row_info->pixel_depth,
3988 else if (row_info->color_type == PNG_COLOR_TYPE_RGB && trans_value)
3990 if (row_info->bit_depth == 8)
3995 sp = row + (png_size_t)row_info->rowbytes - 1;
4008 else if (row_info->bit_depth == 16)
4016 sp = row + row_info->rowbytes - 1;
4043 row_info->color_type = PNG_COLOR_TYPE_RGB_ALPHA;
4044 row_info->channels = 4;
4045 row_info->pixel_depth = (png_byte)(row_info->bit_depth << 2);
4046 row_info->rowbytes = PNG_ROWBYTES(row_info->pixel_depth, row_width);
4054 png_do_dither(png_row_infop row_info, png_bytep row,
4059 png_uint_32 row_width=row_info->width;
4064 if (row != NULL && row_info != NULL)
4067 if (row_info->color_type == PNG_COLOR_TYPE_RGB &&
4068 palette_lookup && row_info->bit_depth == 8)
4097 row_info->color_type = PNG_COLOR_TYPE_PALETTE;
4098 row_info->channels = 1;
4099 row_info->pixel_depth = row_info->bit_depth;
4100 row_info->rowbytes = PNG_ROWBYTES(row_info->pixel_depth, row_width);
4102 else if (row_info->color_type == PNG_COLOR_TYPE_RGB_ALPHA &&
4103 palette_lookup != NULL && row_info->bit_depth == 8)
4126 row_info->color_type = PNG_COLOR_TYPE_PALETTE;
4127 row_info->channels = 1;
4128 row_info->pixel_depth = row_info->bit_depth;
4129 row_info->rowbytes = PNG_ROWBYTES(row_info->pixel_depth, row_width);
4131 else if (row_info->color_type == PNG_COLOR_TYPE_PALETTE &&
4132 dither_lookup && row_info->bit_depth == 8)
4405 png_do_read_intrapixel(png_row_infop row_info, png_bytep row)
4411 row != NULL && row_info != NULL &&
4413 (row_info->color_type & PNG_COLOR_MASK_COLOR))
4416 png_uint_32 row_width = row_info->width;
4417 if (row_info->bit_depth == 8)
4422 if (row_info->color_type == PNG_COLOR_TYPE_RGB)
4425 else if (row_info->color_type == PNG_COLOR_TYPE_RGB_ALPHA)
4437 else if (row_info->bit_depth == 16)
4442 if (row_info->color_type == PNG_COLOR_TYPE_RGB)
4445 else if (row_info->color_type == PNG_COLOR_TYPE_RGB_ALPHA)