diff options
Diffstat (limited to 'converter/other/pnmtops.c')
-rw-r--r-- | converter/other/pnmtops.c | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/converter/other/pnmtops.c b/converter/other/pnmtops.c index 316b7626..cf6b2873 100644 --- a/converter/other/pnmtops.c +++ b/converter/other/pnmtops.c @@ -1125,6 +1125,19 @@ validateComputableBoundingBox(float const scols, static void +warnUserRescaling(float const scale) { + + const char * const baseMsg = "warning, image too large for page"; + + if (pm_have_float_format()) + pm_message("%s; rescaling to %g", baseMsg, scale); + else + pm_message("%s; rescaling", baseMsg); +} + + + +static void computeImagePosition(int const dpiX, int const dpiY, int const icols, @@ -1231,8 +1244,7 @@ computeImagePosition(int const dpiX, *srowsP = scale * rows * pixfacY; if (scale != requestedScale) - pm_message("warning, image too large for page, rescaling to %g", - scale ); + warnUserRescaling(scale); /* Before May 2001, Pnmtops enforced a 5% margin around the page. If the image would be too big to leave a 5% margin, Pnmtops would |