[cairo-commit] cairo-demo/png write_png.c, 1.4, 1.5 ChangeLog, 1.9, 1.10

Carl Worth commit at pdx.freedesktop.org
Wed Apr 28 22:36:03 PDT 2004


Committed by: cworth

Update of /cvs/cairo/cairo-demo/png
In directory pdx:/tmp/cvs-serv25317

Modified Files:
	write_png.c ChangeLog 
Log Message:

        * write_png.c (unpremultiply_data): Use memcpy rather than
        assignment to avoid problems with unaligned pointers on particular
        machines.


Index: write_png.c
===================================================================
RCS file: /cvs/cairo/cairo-demo/png/write_png.c,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** a/write_png.c	29 Apr 2004 05:28:31 -0000	1.4
--- b/write_png.c	29 Apr 2004 05:36:01 -0000	1.5
***************
*** 46,50 ****
  	alpha = (pixel & 0xff000000) >> 24;
          if (alpha == 0) {
!             *p = 0;
  	} else {
              b[0] = (((pixel & 0x0000ff) >>  0) * 255) / alpha;
--- 46,50 ----
  	alpha = (pixel & 0xff000000) >> 24;
          if (alpha == 0) {
! 	    b[0] = b[1] = b[2] = b[3] = 0;
  	} else {
              b[0] = (((pixel & 0x0000ff) >>  0) * 255) / alpha;

Index: ChangeLog
===================================================================
RCS file: /cvs/cairo/cairo-demo/png/ChangeLog,v
retrieving revision 1.9
retrieving revision 1.10
diff -C2 -d -r1.9 -r1.10
*** a/ChangeLog	29 Apr 2004 05:28:31 -0000	1.9
--- b/ChangeLog	29 Apr 2004 05:36:01 -0000	1.10
***************
*** 4,7 ****
--- 4,8 ----
  	assignment to avoid problems with unaligned pointers on particular
  	machines.
+ 	(unpremultiply_data): Missed one.
  
  2004-04-06  David Reveman  <c99drn at cs.umu.se>





More information about the cairo-commit mailing list