diff options
author | giraffedata <giraffedata@9d0c8265-081b-0410-96cb-a4ca84ce46f8> | 2023-12-28 19:53:34 +0000 |
---|---|---|
committer | giraffedata <giraffedata@9d0c8265-081b-0410-96cb-a4ca84ce46f8> | 2023-12-28 19:53:34 +0000 |
commit | 5d16663331afd0bc2edaeb2e49042dc219ce9c2f (patch) | |
tree | 476fbb2ab4311d4bb6d65b250825e254a7a2c1ef /converter/other/pnmtops.c | |
parent | 42f0bf8e7f1ff88000a3584c265e6f1631662ec4 (diff) | |
download | netpbm-mirror-5d16663331afd0bc2edaeb2e49042dc219ce9c2f.tar.gz netpbm-mirror-5d16663331afd0bc2edaeb2e49042dc219ce9c2f.tar.xz netpbm-mirror-5d16663331afd0bc2edaeb2e49042dc219ce9c2f.zip |
promote Development to Advanced
git-svn-id: http://svn.code.sf.net/p/netpbm/code/advanced@4827 9d0c8265-081b-0410-96cb-a4ca84ce46f8
Diffstat (limited to 'converter/other/pnmtops.c')
-rw-r--r-- | converter/other/pnmtops.c | 20 |
1 files 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; |