diff options
Diffstat (limited to 'other')
-rw-r--r-- | other/pamstack.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/other/pamstack.c b/other/pamstack.c index 75b66cb7..3f974a3a 100644 --- a/other/pamstack.c +++ b/other/pamstack.c @@ -236,8 +236,8 @@ processOneImageInAllStreams(unsigned int const nInput, if (inpam[inputSeq].maxval != inpam[0].maxval) allImagesSameMaxval = false; - maxvalLcm = pm_lcm(maxvalLcm, inpam[inputSeq].maxval, 1, - PAM_OVERALL_MAXVAL); + maxvalLcm = pm_lcm(maxvalLcm + 1, inpam[inputSeq].maxval + 1, 1, + PAM_OVERALL_MAXVAL) - 1; outputDepth += inpam[inputSeq].depth; } @@ -247,9 +247,8 @@ processOneImageInAllStreams(unsigned int const nInput, switch (maxvalScaling) { case MAXVALSCALE_NONE: if (!allImagesSameMaxval) - pm_message("Inputs do not all have same maxval. " - "Consider -firstmaxval or -lcmmaxval"); - outpam.maxval = inpam[0].maxval; + pm_error("Inputs do not all have same maxval. " + "Consider -firstmaxval or -lcmmaxval"); break; case MAXVALSCALE_FIRST: outpam.maxval = inpam[0].maxval; |