Return-Path: <gerben@ZyLAB.COM>
Received: from cee.skynet.be (cee.skynet.be [195.238.2.101])
        by twentyeight.skynet.be (8.12.9/8.12.9/Skynet-MAILSTORE-2.14) with ESMTP id i0EHETXX023799
        for <joris.at.lebbeke@skynet.be>; Wed, 14 Jan 2004 18:14:37 +0100
        (envelope-from <gerben@ZyLAB.COM>)
Received: from castor.zylab.nl (zyfire.irt.nl [193.67.146.3] (may be forged))
        by cee.skynet.be (8.12.9/8.12.9/Skynet-IN-2.32) with ESMTP id i0EHEMTF023165
        for <joris.at.lebbeke@skynet.be>; Wed, 14 Jan 2004 18:14:22 +0100
        (envelope-from <gerben@ZyLAB.COM>)
Received: from zyback2.zylab.nl (unknown [192.168.1.2])
	by castor.zylab.nl (Postfix) with ESMTP id 67980492DC
	for <joris.at.lebbeke@skynet.be>; Wed, 14 Jan 2004 17:52:03 +0100 (CET)
Received: from zymail.zylab.nl ([192.168.1.10]) by zyback2.zylab.nl with Microsoft SMTPSVC(5.0.2195.5329);
	 Wed, 14 Jan 2004 18:13:51 +0100
X-MimeOLE: Produced By Microsoft Exchange V6.0.6249.0
content-class: urn:content-classes:message
MIME-Version: 1.0
Content-Type: text/plain;
	charset="iso-8859-1"
Subject: Re: [Tiff] COLORMAP and byte padding
Date: Wed, 14 Jan 2004 18:13:50 +0100
Message-ID: <44E68E8A7590D411862200508B9AFC2201AFF30A@zymail.zylab.nl>
X-MS-Has-Attach: 
X-MS-TNEF-Correlator: 
Thread-Topic: [Tiff] COLORMAP and byte padding
Thread-Index: AcPavp1p3XR1Z5vtRBSkDM/Kxm41PwAAZewA
From: "Gerben Vos" <gerben@ZyLAB.COM>
To: "Tiff mailing list" <tiff@remotesensing.org>
Cc: "Joris" <joris.at.lebbeke@skynet.be>
X-OriginalArrivalTime: 14 Jan 2004 17:13:51.0984 (UTC) FILETIME=[C8425700:01C3DAC1]
Content-Transfer-Encoding: 8bit
X-MIME-Autoconverted: from quoted-printable to 8bit by twentyeight.skynet.be id i0EHETXX023799
X-UIDL: 39c48eb2e17d2bae88d83ba189ecba35
Status: U

> uint8val = uint16val/65535*255
>              = uint16val/257

> Are you sure that boils down to >>8? I'd have to check...

Oops, no. That's wrong in 16256 cases, roughly 24.8%. Should have checked before I spoke. My deepest apologies.

Guess downconverting has to be slow, unless you know you've taken Frank's not quite precise shortcut when upconverting. (Well, if you feel the need for speed you could always sacrifice 65536 bytes to a lookup table.)

					Gerben.

