From 932401e0518055fcd44e9b0b37c5c25cf5c3afe6 Mon Sep 17 00:00:00 2001 From: Mukund Sivaraman Date: Wed, 21 Jan 2015 15:24:22 +0530 Subject: [PATCH] file-pnm: Don't write comments into PFM files --- plug-ins/common/file-pnm.c | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/plug-ins/common/file-pnm.c b/plug-ins/common/file-pnm.c index f895a1ef87..73f60a084c 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)