diff options
author | hpa <hpa> | 2001-05-09 17:48:31 +0000 |
---|---|---|
committer | hpa <hpa> | 2001-05-09 17:48:31 +0000 |
commit | 36c7383733ea8c10b967a07be667545ab89cb37b (patch) | |
tree | ab365a6ba45d175586e51d3a087a8129b5189ea6 | |
parent | 553446f440297f81a68df56f9a03b39852ef7292 (diff) | |
download | syslinux-36c7383733ea8c10b967a07be667545ab89cb37b.tar.gz |
Correct the handling of "equal buckets conversion". This is probably
correct, but risks floating-point errors, which is a major concern.
-rwxr-xr-x | ppmtolss16 | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -53,9 +53,9 @@ sub rgbconvert($$) { my($r,$g,$b); ($r, $g, $b) = unpack("CCC", $rgb); - $r = int($r*$maxmult+0.5); - $g = int($g*$maxmult+0.5); - $b = int($b*$maxmult+0.5); + $r = int($r*$maxmult); + $g = int($g*$maxmult); + $b = int($b*$maxmult); $rgb = pack("CCC", $r, $g, $b); return $rgb; } |