]> git.pld-linux.org Git - packages/libpng.git/commitdiff
- some way to fix alpha stripping bug introduced in 1.2.7 (affected e.g. links-hacked)
authorJakub Bogusz <qboosh@pld-linux.org>
Wed, 13 Oct 2004 14:36:20 +0000 (14:36 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
Changed files:
    libpng-alpha.patch -> 1.1

libpng-alpha.patch [new file with mode: 0644]

diff --git a/libpng-alpha.patch b/libpng-alpha.patch
new file mode 100644 (file)
index 0000000..d0753b0
--- /dev/null
@@ -0,0 +1,18 @@
+recent change from libpng 1.2.7 broke alpha stripping
+png_set_strip_alpha() does info_ptr->color_type &= ~PNG_COLOR_MASK_ALPHA,
+but png_do_strip_filler checks png_ptr->row_info.color_type not
+info_ptr->color_type
+
+--- libpng-1.2.7/pngread.c.orig        2004-09-12 04:19:31.000000000 +0200
++++ libpng-1.2.7/pngread.c     2004-10-13 16:22:29.000000000 +0200
+@@ -726,6 +726,10 @@
+    png_ptr->row_info.pixel_depth = png_ptr->pixel_depth;
+    png_ptr->row_info.rowbytes = PNG_ROWBYTES(png_ptr->row_info.pixel_depth,
+        png_ptr->row_info.width);
++#if defined(PNG_READ_STRIP_ALPHA_SUPPORTED)
++   if (png_ptr->transformations & PNG_STRIP_ALPHA)
++         png_ptr->row_info.color_type &= ~PNG_COLOR_MASK_ALPHA;
++#endif
+    if(png_ptr->row_buf[0])
+    png_read_filter_row(png_ptr, &(png_ptr->row_info),
This page took 0.030533 seconds and 4 git commands to generate.