diff options
Diffstat (limited to 'editor/pnmremap.c')
-rw-r--r-- | editor/pnmremap.c | 7 |
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[] ) { |