about summary refs log tree commit diff
path: root/converter/other/pngtopam.c
diff options
context:
space:
mode:
Diffstat (limited to 'converter/other/pngtopam.c')
-rw-r--r--converter/other/pngtopam.c14
1 files changed, 10 insertions, 4 deletions
diff --git a/converter/other/pngtopam.c b/converter/other/pngtopam.c
index e6e68587..59b29f5f 100644
--- a/converter/other/pngtopam.c
+++ b/converter/other/pngtopam.c
@@ -1243,10 +1243,16 @@ warnNonsquarePixels(struct pngx * const pngxP,
             (float)pngx_xPixelsPerMeter(pngxP) / pngx_yPixelsPerMeter(pngxP);
 
         if (r != 1.0) {
-            pm_message ("warning - non-square pixels; "
-                        "to fix do a 'pamscale -%cscale %g'",
-                        r < 1.0 ? 'x' : 'y',
-                        r < 1.0 ? 1.0 / r : r );
+            const char * const baseMsg = "warning - non-square pixels";
+
+            if (pm_have_float_format())
+                pm_message("%s; to fix do a 'pamscale -%cscale %g'",
+                           baseMsg,
+                           r < 1.0 ? 'x' : 'y',
+                           r < 1.0 ? 1.0 / r : r);
+            else
+                pm_message("%s", baseMsg);
+
             *errorLevelP = PNMTOPNG_WARNING_LEVEL;
         }
     }