浏览代码

Use convential PPM header (magic, width/height, maxval on separate lines)

git-svn-id: https://svn.osgeo.org/grass/grass/trunk@40958 15284696-431f-4ddb-bdfa-cd5b030d7da7
Glynn Clements 15 年之前
父节点
当前提交
e698059ace
共有 1 个文件被更改,包括 2 次插入2 次删除
  1. 2 2
      lib/ogsf/gsd_img_ppm.c

+ 2 - 2
lib/ogsf/gsd_img_ppm.c

@@ -54,7 +54,7 @@ int GS_write_ppm(const char *name)
 	return (1);
     }
 
-    fprintf(fp, "P6 %d %d 255\n", xsize, ysize);
+    fprintf(fp, "P6\n%d %d\n255\n", xsize, ysize);
 
     for (y = ysize - 1; y >= 0; y--) {
 	for (x = 0; x < xsize; x++) {
@@ -97,7 +97,7 @@ int GS_write_zoom(const char *name, unsigned int xsize, unsigned int ysize)
 	return (1);
     }
 
-    fprintf(fp, "P6 %d %d 255\n", xsize, ysize);
+    fprintf(fp, "P6\n%d %d\n255\n", xsize, ysize);
 
     for (y = ysize - 1; y >= 0; y--) {
 	for (x = 0; x < xsize; x++) {