about summary refs log tree commit diff
path: root/editor/pnmremap.c
diff options
context:
space:
mode:
authorgiraffedata <giraffedata@9d0c8265-081b-0410-96cb-a4ca84ce46f8>2007-03-22 02:06:50 +0000
committergiraffedata <giraffedata@9d0c8265-081b-0410-96cb-a4ca84ce46f8>2007-03-22 02:06:50 +0000
commitd61f5224ebf37f0f91cdca013f833a78ad999f57 (patch)
tree14eb770fc00567c1ae0df088d90c3d8d9bf64baf /editor/pnmremap.c
parentee6b85d13c18965234318a1880de35d392112664 (diff)
downloadnetpbm-mirror-d61f5224ebf37f0f91cdca013f833a78ad999f57.tar.gz
netpbm-mirror-d61f5224ebf37f0f91cdca013f833a78ad999f57.tar.xz
netpbm-mirror-d61f5224ebf37f0f91cdca013f833a78ad999f57.zip
reverse order of depth adjustment, maxval adjustment so all planes get maxval adjustment
git-svn-id: http://svn.code.sf.net/p/netpbm/code/trunk@248 9d0c8265-081b-0410-96cb-a4ca84ce46f8
Diffstat (limited to 'editor/pnmremap.c')
-rw-r--r--editor/pnmremap.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/editor/pnmremap.c b/editor/pnmremap.c
index e9466fe5..0260839a 100644
--- a/editor/pnmremap.c
+++ b/editor/pnmremap.c
@@ -743,8 +743,9 @@ copyRaster(struct pam *   const inpamP,
         /* The following modify tuplerow, to make it consistent with
            *outpamP instead of *inpamP.
         */
-        adjustDepth(inpamP, tuplerow, outpamP->depth); 
+        assert(inpamP->allocation_depth >= outpamP->depth);
         pnm_scaletuplerow(inpamP, tuplerow, tuplerow, outpamP->maxval);
+        adjustDepth(inpamP, tuplerow, outpamP->depth); 
 
         /* The following both consults and adds to 'colorhash' and
            its associated 'usehash'.  It modifies 'tuplerow' too.
@@ -764,7 +765,6 @@ copyRaster(struct pam *   const inpamP,
 
 
 
-
 static void
 remap(FILE * const ifP,
       const struct pam * const outpamCommonP,
@@ -801,7 +801,7 @@ remap(FILE * const ifP,
                    missingMethod, defaultColor, &missingCount);
         
         if (verbose)
-            pm_message("%d pixels not matched in color map", missingCount);
+            pm_message("%u pixels not matched in color map", missingCount);
         
         pnm_nextimage(ifP, &eof);
     }
@@ -809,7 +809,6 @@ remap(FILE * const ifP,
 
 
 
-
 int
 main(int argc, char * argv[] ) {