diff options
author | giraffedata <giraffedata@9d0c8265-081b-0410-96cb-a4ca84ce46f8> | 2007-12-11 23:05:50 +0000 |
---|---|---|
committer | giraffedata <giraffedata@9d0c8265-081b-0410-96cb-a4ca84ce46f8> | 2007-12-11 23:05:50 +0000 |
commit | 0bfd0c118ea28cf4a435d433e920ad26e04ec51a (patch) | |
tree | 46dee4abcd182997a05c46c3afb3a65d6208242c /converter/other | |
parent | 405ceae2f5ef0cd237b607889e55455f4cc34640 (diff) | |
download | netpbm-mirror-0bfd0c118ea28cf4a435d433e920ad26e04ec51a.tar.gz netpbm-mirror-0bfd0c118ea28cf4a435d433e920ad26e04ec51a.tar.xz netpbm-mirror-0bfd0c118ea28cf4a435d433e920ad26e04ec51a.zip |
fix incorrect pixels with PNM maxval != TIFF maxval
git-svn-id: http://svn.code.sf.net/p/netpbm/code/trunk@486 9d0c8265-081b-0410-96cb-a4ca84ce46f8
Diffstat (limited to 'converter/other')
-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; } |