diff options
Diffstat (limited to 'converter')
-rw-r--r-- | converter/other/pamtotiff.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/converter/other/pamtotiff.c b/converter/other/pamtotiff.c index 4174a431..49123d4f 100644 --- a/converter/other/pamtotiff.c +++ b/converter/other/pamtotiff.c @@ -351,10 +351,10 @@ putSample(sample const s, if (maxval != tiff_maxval) s2 = s * tiff_maxval / maxval; if (bitspersample > 8) { - *((unsigned short *)(*tPP)) = s; + *((unsigned short *)(*tPP)) = s2; (*tPP) += sizeof(short); } else - *(*tPP)++ = s & 0xff; + *(*tPP)++ = s2 & 0xff; } |