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 | |
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
-rw-r--r-- | converter/other/pamtotiff.c | 4 | ||||
-rw-r--r-- | doc/HISTORY | 3 |
2 files changed, 5 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; } diff --git a/doc/HISTORY b/doc/HISTORY index 006b5d80..add0c2e6 100644 --- a/doc/HISTORY +++ b/doc/HISTORY @@ -25,6 +25,9 @@ not yet BJH Release 10.41.00 pamditherbw, pamsharpness, pamsharpmask, pamtopfm: fix crash due to write to arbitrary memory. + pamtotiff: fix incorrect pixels with PNM maxval != TIFF + maxval. + pnmcrop: fix -verbose message about background color with -white. |