[gimp] file-pnm: Don't write comments into PFM files



commit 932401e0518055fcd44e9b0b37c5c25cf5c3afe6
Author: Mukund Sivaraman <muks banu com>
Date:   Wed Jan 21 15:24:22 2015 +0530

    file-pnm: Don't write comments into PFM files

 plug-ins/common/file-pnm.c |   13 ++++++++-----
 1 files changed, 8 insertions(+), 5 deletions(-)
---
diff --git a/plug-ins/common/file-pnm.c b/plug-ins/common/file-pnm.c
index f895a1e..73f60a0 100644
--- a/plug-ins/common/file-pnm.c
+++ b/plug-ins/common/file-pnm.c
@@ -1388,12 +1388,15 @@ save_image (GFile     *file,
       g_free (cmap);
     }
 
-  /* write out comment string */
-  comment = g_strdup_printf("# Created by GIMP version %s PNM plug-in\n",
-                            GIMP_VERSION);
+  if (!float_format)
+    {
+      /* write out comment string */
+      comment = g_strdup_printf("# Created by GIMP version %s PNM plug-in\n",
+                                GIMP_VERSION);
 
-  if (! output_write (output, comment, strlen (comment), error))
-      goto out;
+      if (! output_write (output, comment, strlen (comment), error))
+        goto out;
+    }
 
   /* write out resolution and maxval */
   if (pbm)


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]