[GRASS-SVN] r41068 - in grass/branches/develbranch_6: lib/cairodriver lib/pngdriver visualization/ximgview

svn_grass at osgeo.org svn_grass at osgeo.org
Wed Feb 17 19:38:51 EST 2010


Author: hamish
Date: 2010-02-17 19:38:50 -0500 (Wed, 17 Feb 2010)
New Revision: 41068

Modified:
   grass/branches/develbranch_6/lib/cairodriver/cairodriver.h
   grass/branches/develbranch_6/lib/cairodriver/write_bmp.c
   grass/branches/develbranch_6/lib/pngdriver/pngdriver.h
   grass/branches/develbranch_6/lib/pngdriver/write_bmp.c
   grass/branches/develbranch_6/visualization/ximgview/main.c
Log:
Glynn: Use 64-byte header to ensure frame buffer alignment (merge from trunk r41029, trac #937)

Modified: grass/branches/develbranch_6/lib/cairodriver/cairodriver.h
===================================================================
--- grass/branches/develbranch_6/lib/cairodriver/cairodriver.h	2010-02-18 00:23:37 UTC (rev 41067)
+++ grass/branches/develbranch_6/lib/cairodriver/cairodriver.h	2010-02-18 00:38:50 UTC (rev 41068)
@@ -14,7 +14,7 @@
 
 #define DEFAULT_FILE_NAME "map.png"
 
-#define HEADER_SIZE 54
+#define HEADER_SIZE 64
 
 /* Scale for converting colors from [0..255] to cairo's [0.0..1.0] */
 #define COLORSCALE (1.0/255.0)

Modified: grass/branches/develbranch_6/lib/cairodriver/write_bmp.c
===================================================================
--- grass/branches/develbranch_6/lib/cairodriver/write_bmp.c	2010-02-18 00:23:37 UTC (rev 41067)
+++ grass/branches/develbranch_6/lib/cairodriver/write_bmp.c	2010-02-18 00:38:50 UTC (rev 41068)
@@ -57,6 +57,7 @@
     if (!output)
 	G_fatal_error("cairo: couldn't open output file %s", file_name);
 
+    memset(header, 0, sizeof(header));
     make_bmp_header(header);
     fwrite(header, sizeof(header), 1, output);
 

Modified: grass/branches/develbranch_6/lib/pngdriver/pngdriver.h
===================================================================
--- grass/branches/develbranch_6/lib/pngdriver/pngdriver.h	2010-02-18 00:23:37 UTC (rev 41067)
+++ grass/branches/develbranch_6/lib/pngdriver/pngdriver.h	2010-02-18 00:38:50 UTC (rev 41068)
@@ -8,7 +8,7 @@
 
 #define FILE_NAME  "map.png"
 
-#define HEADER_SIZE 54
+#define HEADER_SIZE 64
 
 extern char *file_name;
 extern int currentColor;

Modified: grass/branches/develbranch_6/lib/pngdriver/write_bmp.c
===================================================================
--- grass/branches/develbranch_6/lib/pngdriver/write_bmp.c	2010-02-18 00:23:37 UTC (rev 41067)
+++ grass/branches/develbranch_6/lib/pngdriver/write_bmp.c	2010-02-18 00:38:50 UTC (rev 41068)
@@ -59,6 +59,7 @@
     if (!output)
 	G_fatal_error("PNG: couldn't open output file %s", file_name);
 
+    memset(header, 0, sizeof(header));
     make_bmp_header(header);
     fwrite(header, sizeof(header), 1, output);
 

Modified: grass/branches/develbranch_6/visualization/ximgview/main.c
===================================================================
--- grass/branches/develbranch_6/visualization/ximgview/main.c	2010-02-18 00:23:37 UTC (rev 41067)
+++ grass/branches/develbranch_6/visualization/ximgview/main.c	2010-02-18 00:38:50 UTC (rev 41068)
@@ -30,7 +30,7 @@
 #include <grass/gis.h>
 #include <grass/glocale.h>
 
-#define HEADER_SIZE 54
+#define HEADER_SIZE 64
 
 Display *dpy;
 int scrn;



More information about the grass-commit mailing list