From ca4e5d91a96387bc270692f520b5a30c09856c16 Mon Sep 17 00:00:00 2001 From: giraffedata Date: Thu, 25 Dec 2014 20:40:38 +0000 Subject: Update Advanced series to 10.69 git-svn-id: http://svn.code.sf.net/p/netpbm/code/advanced@2351 9d0c8265-081b-0410-96cb-a4ca84ce46f8 --- converter/other/pngtopam.c | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) (limited to 'converter/other/pngtopam.c') 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; } } -- cgit 1.4.1