]> git.pld-linux.org Git - packages/libpng.git/blob - libpng-alpha.patch
- some way to fix alpha stripping bug introduced in 1.2.7 (affected e.g. links-hacked)
[packages/libpng.git] / libpng-alpha.patch
1 recent change from libpng 1.2.7 broke alpha stripping
2 png_set_strip_alpha() does info_ptr->color_type &= ~PNG_COLOR_MASK_ALPHA,
3 but png_do_strip_filler checks png_ptr->row_info.color_type not
4 info_ptr->color_type
5
6 --- libpng-1.2.7/pngread.c.orig 2004-09-12 04:19:31.000000000 +0200
7 +++ libpng-1.2.7/pngread.c      2004-10-13 16:22:29.000000000 +0200
8 @@ -726,6 +726,10 @@
9     png_ptr->row_info.pixel_depth = png_ptr->pixel_depth;
10     png_ptr->row_info.rowbytes = PNG_ROWBYTES(png_ptr->row_info.pixel_depth,
11         png_ptr->row_info.width);
12 +#if defined(PNG_READ_STRIP_ALPHA_SUPPORTED)
13 +   if (png_ptr->transformations & PNG_STRIP_ALPHA)
14 +          png_ptr->row_info.color_type &= ~PNG_COLOR_MASK_ALPHA;
15 +#endif
16  
17     if(png_ptr->row_buf[0])
18     png_read_filter_row(png_ptr, &(png_ptr->row_info),
This page took 0.036635 seconds and 3 git commands to generate.