diff options
author | giraffedata <giraffedata@9d0c8265-081b-0410-96cb-a4ca84ce46f8> | 2019-09-28 19:34:22 +0000 |
---|---|---|
committer | giraffedata <giraffedata@9d0c8265-081b-0410-96cb-a4ca84ce46f8> | 2019-09-28 19:34:22 +0000 |
commit | 860faaae6a58e83623b9620dc0e0f36f3126b251 (patch) | |
tree | e09259abd808ac7e9a4c2494e1ccefa0d08ef991 /editor | |
parent | 2b499210eb2a64c95e6891a8d361b38a8502e063 (diff) | |
download | netpbm-mirror-860faaae6a58e83623b9620dc0e0f36f3126b251.tar.gz netpbm-mirror-860faaae6a58e83623b9620dc0e0f36f3126b251.tar.xz netpbm-mirror-860faaae6a58e83623b9620dc0e0f36f3126b251.zip |
Promote Development to Advanced
git-svn-id: http://svn.code.sf.net/p/netpbm/code/advanced@3691 9d0c8265-081b-0410-96cb-a4ca84ce46f8
Diffstat (limited to 'editor')
-rw-r--r-- | editor/pnmremap.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/editor/pnmremap.c b/editor/pnmremap.c index 0038f4d7..0c0096ba 100644 --- a/editor/pnmremap.c +++ b/editor/pnmremap.c @@ -1043,13 +1043,6 @@ copyRaster(struct pam * const inpamP, inrow = pnm_allocpamrow(inpamP); outrow = pnm_allocpamrow(&workpam); - if (outpamP->maxval != inpamP->maxval && defaultColor) - pm_error("The maxval of the colormap (%u) is not equal to the " - "maxval of the input image (%u). This is allowable only " - "if you are doing an approximate mapping (i.e. you don't " - "specify -firstisdefault or -missingcolor)", - (unsigned int)outpamP->maxval, (unsigned int)inpamP->maxval); - selectDepthAdjustment(inpamP, outpamP->depth, &depthAdjustment); usehash = TRUE; @@ -1120,6 +1113,13 @@ remap(FILE * const ifP, outpam.width = inpam.width; outpam.height = inpam.height; + if (outpam.maxval != inpam.maxval && defaultColor) + pm_error("The maxval of the colormap (%u) is not equal to the " + "maxval of the input image (%u). This is allowable only " + "if you are doing an approximate mapping (i.e. you don't " + "specify -firstisdefault or -missingcolor)", + (unsigned int)outpam.maxval, (unsigned int)inpam.maxval); + pnm_writepaminit(&outpam); /* Set up so input buffers have extra space as needed to |