From fb3bd337b17f76f749711bb53f09113d78c5e211 Mon Sep 17 00:00:00 2001 From: giraffedata Date: Thu, 19 Oct 2023 18:21:30 +0000 Subject: cleanup git-svn-id: http://svn.code.sf.net/p/netpbm/code/trunk@4765 9d0c8265-081b-0410-96cb-a4ca84ce46f8 --- converter/other/pnmtops.c | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/converter/other/pnmtops.c b/converter/other/pnmtops.c index 3ca158b5..d2577dd6 100644 --- a/converter/other/pnmtops.c +++ b/converter/other/pnmtops.c @@ -58,6 +58,10 @@ +unsigned int const psScaleFactor = 72; + + + static void setSignals() { /*---------------------------------------------------------------------------- @@ -291,21 +295,21 @@ parseCommandLine(int argc, const char ** argv, cmdlineP->canturn = !noturn; cmdlineP->showpage = !noshowpage; - validateCompDimension(width, 72, "-width value"); - validateCompDimension(height, 72, "-height value"); + validateCompDimension(width, psScaleFactor, "-width value"); + validateCompDimension(height, psScaleFactor, "-height value"); - cmdlineP->width = width * 72; - cmdlineP->height = height * 72; + cmdlineP->width = width * psScaleFactor; + cmdlineP->height = height * psScaleFactor; if (imagewidthSpec) { - validateCompDimension(imagewidth, 72, "-imagewidth value"); - cmdlineP->imagewidth = imagewidth * 72; + validateCompDimension(imagewidth, psScaleFactor, "-imagewidth value"); + cmdlineP->imagewidth = imagewidth * psScaleFactor; } else cmdlineP->imagewidth = 0; if (imageheightSpec) { - validateCompDimension(imagewidth, 72, "-imageheight value"); - cmdlineP->imageheight = imageheight * 72; + validateCompDimension(imagewidth, psScaleFactor, "-imageheight value"); + cmdlineP->imageheight = imageheight * psScaleFactor; } else cmdlineP->imageheight = 0; -- cgit 1.4.1