Return-Path: <tiff-admin@remotesensing.org>
Received: from kay.skynet.be (kay.skynet.be [195.238.3.235])
        by twentyeight.skynet.be (8.12.9/8.12.9/Skynet-MAILSTORE-2.14) with ESMTP id i0F0D5aU015482
        for <joris.at.lebbeke@skynet.be>; Thu, 15 Jan 2004 01:13:05 +0100
        (envelope-from <tiff-admin@remotesensing.org>)
Received: from yoda.imagelinks.com ([208.24.120.42])
        by kay.skynet.be (8.12.9/8.12.9/Skynet-IN-2.32) with ESMTP id i0F0Ccdg018400
        for <joris.at.lebbeke@skynet.be>; Thu, 15 Jan 2004 01:12:39 +0100
        (envelope-from <tiff-admin@remotesensing.org>)
Received: from yoda.imagelinks.com (localhost.localdomain [127.0.0.1])
	by yoda.imagelinks.com (8.11.6/8.11.2) with ESMTP id i0F0B4l29227;
	Wed, 14 Jan 2004 19:11:04 -0500
Received: from smtp-relay-8.adobe.com (smtp-relay-8.adobe.com [192.150.22.8])
	by yoda.imagelinks.com (8.11.6/8.11.2) with ESMTP id i0F0AQl28565
	for <tiff@remotesensing.org>; Wed, 14 Jan 2004 19:10:28 -0500
Received: from inner-relay-1.corp.adobe.com (inner-relay-1 [153.32.1.51])
	by smtp-relay-8.adobe.com (8.12.10/8.12.10) with ESMTP id i0F08gkT021262;
	Wed, 14 Jan 2004 16:08:48 -0800 (PST)
Received: from calsj-dev (mailsj [153.32.1.239])
	by inner-relay-1.corp.adobe.com (8.12.9/8.12.9) with ESMTP id i0F08brn013632;
	Wed, 14 Jan 2004 16:08:37 -0800 (PST)
Received: from [153.32.48.223] (noname.corp.adobe.com [153.32.48.223])
 by mailsj-v1.corp.adobe.com
 (iPlanet Messaging Server 5.2 HotFix 1.21 (built Sep  8 2003))
 with ESMTP id <0HRI002SH8ECAK@mailsj-v1.corp.adobe.com>; Wed,
 14 Jan 2004 16:08:37 -0800 (PST)
From: Chris Cox <ccox@adobe.com>
Subject: Re: [Tiff] COLORMAP and byte padding
In-reply-to: <40055B44.8030303@pobox.com>
X-Sender: ccox@mailsj.corp.adobe.com
To: Frank Warmerdam <warmerdam@pobox.com>,
   Stephan Assmus <stippi@yellowbites.com>,
   TIFF Mailing List <tiff@remotesensing.org>
Message-id: <p05210605bc2b897df844@[153.32.48.223]>
MIME-version: 1.0
Content-type: text/plain; charset=us-ascii; format=flowed
Content-transfer-encoding: 7BIT
References: <10196657408-BeMail@stippis> <40055B44.8030303@pobox.com>
Sender: tiff-admin@remotesensing.org
Errors-To: tiff-admin@remotesensing.org
X-BeenThere: tiff@remotesensing.org
X-Mailman-Version: 2.0.11
Precedence: bulk
List-Help: <mailto:tiff-request@remotesensing.org?subject=help>
List-Post: <mailto:tiff@remotesensing.org>
List-Subscribe: <http://remotesensing.org/mailman/listinfo/tiff>,
	<mailto:tiff-request@remotesensing.org?subject=subscribe>
List-Id: TIFF and libtiff discussion <tiff.remotesensing.org>
List-Unsubscribe: <http://remotesensing.org/mailman/listinfo/tiff>,
	<mailto:tiff-request@remotesensing.org?subject=unsubscribe>
List-Archive: <http://remotesensing.org/pipermail/tiff/>
Date: Wed, 14 Jan 2004 16:05:09 -0800
X-UIDL: 987824c73eb6e0dccd8d350be934e204
Status: U

>
>There is no support for alpha values in the TIFF colormaps, so you just
>need to deal with the red, green and blue components.  The individual
>components are uint16's to give additional precision in color specification.
>I have typically computed the 16bit value by multiplying the 8bit value
>by 256, but that isn't really the most precise approach as 255 would not
>quite become the maximum 16bit value (65535).

Either shift left by 8 and or the values (val16 = (val8 << 8) | 
val8), or multiply by 257 (255 * 257 = 65535).

Chris
_______________________________________________
Tiff mailing list
Tiff@remotesensing.org
http://remotesensing.org/mailman/listinfo/tiff
