[GRASS-SVN] r43641 -
grass/branches/releasebranch_6_4/lib/cairodriver
svn_grass at osgeo.org
svn_grass at osgeo.org
Wed Sep 22 17:36:11 EDT 2010
Author: neteler
Date: 2010-09-22 21:36:11 +0000 (Wed, 22 Sep 2010)
New Revision: 43641
Modified:
grass/branches/releasebranch_6_4/lib/cairodriver/cairodriver.h
grass/branches/releasebranch_6_4/lib/cairodriver/write_bmp.c
Log:
backport: Glynn: Use 64-byte header to ensure frame buffer alignment (trac #937)
Modified: grass/branches/releasebranch_6_4/lib/cairodriver/cairodriver.h
===================================================================
--- grass/branches/releasebranch_6_4/lib/cairodriver/cairodriver.h 2010-09-22 21:35:51 UTC (rev 43640)
+++ grass/branches/releasebranch_6_4/lib/cairodriver/cairodriver.h 2010-09-22 21:36:11 UTC (rev 43641)
@@ -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/releasebranch_6_4/lib/cairodriver/write_bmp.c
===================================================================
--- grass/branches/releasebranch_6_4/lib/cairodriver/write_bmp.c 2010-09-22 21:35:51 UTC (rev 43640)
+++ grass/branches/releasebranch_6_4/lib/cairodriver/write_bmp.c 2010-09-22 21:36:11 UTC (rev 43641)
@@ -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);
More information about the grass-commit
mailing list