[poppler] test: ChangeLog,1.14,1.15 read-png.c,1.1.1.1,1.2

Jeff Muizelaar jrmuizel at kemper.freedesktop.org
Thu Mar 30 22:06:24 PST 2006


Update of /cvs/poppler/test
In directory kemper:/tmp/cvs-serv29106

Modified Files:
	ChangeLog read-png.c 
Log Message:
2006-03-31  Jeff Muizelaar  <jeff at infidigm.net>

	* read-png.c: (read_png_argb32): improve performance by only
	premultiplying when there is alpha to premultiply.


Index: ChangeLog
===================================================================
RCS file: /cvs/poppler/test/ChangeLog,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -d -r1.14 -r1.15
--- ChangeLog	10 Jan 2006 18:40:08 -0000	1.14
+++ ChangeLog	31 Mar 2006 06:06:21 -0000	1.15
@@ -1,3 +1,8 @@
+2006-03-31  Jeff Muizelaar  <jeff at infidigm.net>
+
+	* read-png.c: (read_png_argb32): improve performance by only
+	premultiplying when there is alpha to premultiply.
+
 2006-01-10  Jeff Muizelaar  <jeff at infidigm.net>
 
 	* test-gen/text.pl:

Index: read-png.c
===================================================================
RCS file: /cvs/poppler/test/read-png.c,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -u -d -r1.1.1.1 -r1.2
--- read-png.c	21 May 2005 02:09:40 -0000	1.1.1.1
+++ read-png.c	31 Mar 2006 06:06:21 -0000	1.2
@@ -146,8 +146,10 @@
 
     png_set_bgr (png);
     png_set_filler (png, 0xff, PNG_FILLER_AFTER);
-
-    png_set_read_user_transform_fn (png, premultiply_data);
+  
+    if (color_type == PNG_COLOR_TYPE_RGB_ALPHA
+	|| color_type == PNG_COLOR_TYPE_GRAY_ALPHA)
+      png_set_read_user_transform_fn (png, premultiply_data);
 
     png_read_update_info (png, info);
 



More information about the poppler mailing list