Return-Path: <tiff-bounces@lists.maptools.org>
X-Original-To: info@awaresystems.be
Delivered-To: info@awaresystems.be
Received: from mx-q.b-one.net (mx-q.one.com [91.198.169.248])
	by mail9.b-one.net (Postfix) with ESMTP id 0D00B400161
	for <info@awaresystems.be>; Tue, 22 Mar 2011 05:02:53 +0100 (CET)
Received: by mx-q.b-one.net (Postfix, from userid 106)
	id 014F9107CEEB; Tue, 22 Mar 2011 05:02:52 +0100 (CET)
X-Virus-Scanned: by one.com
X-Spam-Flag: NO
X-Spam-Score: 0
X-Spam-Level: 
X-Spam-Status: No, score=0 tagged_above=0 required=4 tests=[none]
X-Greylist: domain auto-whitelisted by SQLgrey-1.7.4
Received: from lists.maptools.org (lists.maptools.org [65.39.174.144]) by
 mx-q.b-one.net (Postfix) with ESMTP id EC3B810C7FBC for
 <info@awaresystems.be>; Tue, 22 Mar 2011 05:02:50 +0100 (CET)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by
 lists.maptools.org (Postfix) with ESMTP id DCF0886C15; Mon, 21 Mar 2011
 23:01:44 -0500 (EST)
Received: from hanghau.pacific.net.hk (hanghau.pacific.net.hk
 [202.64.33.147]) by lists.maptools.org (Postfix) with ESMTP id 9D09186B1A for
 <tiff@lists.maptools.org>; Mon, 21 Mar 2011 23:01:14 -0500 (EST)
Received: from i7.coppice.org (9.160.232.220.dyn.pacific.net.hk
 [220.232.160.9]) by hanghau.pacific.net.hk with ESMTP id p2M41BMf031823 for
 <tiff@lists.maptools.org>; Tue, 22 Mar 2011 12:01:12 +0800
Message-ID: <4D881F07.4030400@coppice.org>
Date: Tue, 22 Mar 2011 12:01:11 +0800
From: Steve Underwood <steveu@coppice.org>
User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.13)
 Gecko/20101209 Fedora/3.1.7-0.35.b3pre.fc13 Lightning/1.0b3pre
 Thunderbird/3.1.7
MIME-Version: 1.0
To: tiff@lists.maptools.org
References: <4D87A562.4000108@coppice.org>
 <alpine.GSO.2.01.1103212226380.27247@freddy.simplesystems.org>
In-Reply-To: <alpine.GSO.2.01.1103212226380.27247@freddy.simplesystems.org>
Subject: Re: [Tiff] Lab based colormaps
X-BeenThere: tiff@lists.maptools.org
X-Mailman-Version: 2.1.9
Precedence: list
List-Id: TIFF and libtiff discussion <tiff.lists.maptools.org>
List-Unsubscribe: <http://lists.maptools.org/mailman/listinfo/tiff>,
 <mailto:tiff-request@lists.maptools.org?subject=unsubscribe>
List-Archive: <http://lists.maptools.org/mailman/private/tiff>
List-Post: <mailto:tiff@lists.maptools.org>
List-Help: <mailto:tiff-request@lists.maptools.org?subject=help>
List-Subscribe: <http://lists.maptools.org/mailman/listinfo/tiff>,
 <mailto:tiff-request@lists.maptools.org?subject=subscribe>
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: tiff-bounces@lists.maptools.org
Errors-To: tiff-bounces@lists.maptools.org

On 03/22/2011 11:29 AM, Bob Friesenhahn wrote:
> On Tue, 22 Mar 2011, Steve Underwood wrote:
>>
>> If I use libtiff to read the colormap it gives me three arrays, each 256
>> elements long, just as would happen for an RGB colour map. If I try to
>> interpret these as the L, a, and b arrays, I get crazy colours. If,
>> however, I reorder the data as if the TIFF file contains the colour
>> table in the order L[0], a[0], b[0], L[1], a[1], b[1], etc. the
>> resulting image looks OK. I can't see in the TIFF spec, or the extension
>> specs, where the order of Lab colormap data is defined. However, it
>> would seem bizarre if it is not in the same order as RGB data.
>>
>> Has anyone had similar experiences? The test files are supposed to have
>> been used for interworking tests with several FAX makers, so I would
>> have expected anything as blatantly wrong as this to have been caught
>> and fixed.
>
> What does 'tiffinfo' say for one of these files?  Are these files 
> available for download from somewhere?
>
> Bob
You can find these test files in several place on the internet, one of 
which is 
http://www.itu.int/itudoc/itu-t/com16/tiff-fx/t-cases/index.html. As far 
as I am aware there is only one revision of these files.

The following is the tiffinfo report for the first page in this file:

TIFFReadDirectory: Warning, /home/steveu/telephony/TIFF-FX/l04x_02x.tif: 
unknown field with tag 346 (0x15a) encountered.
TIFFReadDirectory: Warning, /home/steveu/telephony/TIFF-FX/l04x_02x.tif: 
unknown field with tag 400 (0x190) encountered.
TIFF Directory at offset 0x8 (8)
   Subfile Type: multi-page document (2 = 0x2)
   Image Width: 1728 Image Length: 2342
   Resolution: 200, 200 pixels/inch
   Bits/Sample: 8
   Compression Scheme: 10 (0xa)
   Photometric Interpretation: 10 (0xa)
   FillOrder: msb-to-lsb
   Samples/Pixel: 1
   Rows/Strip: 2342
   Planar Configuration: single image plane
   Page Number: 0-2
   Color Map: (present)
   DocumentName: Test case L4
   ImageDescription: Page 1: Color test chart  Page 2: Bar chart
   Software: Xerox TIFF-FX Reference Implementation Mon Feb 08 08:58:02 
PM 99
   Tag 346: 1
   Tag 400: 1946

Tag 346 says its a color-map indexed image. Tag 400 is TIFF-FX specific, 
and points to a global IFD.

Compression scheme 10 is T.43. Photometric Interpretation 10 is ITULAB. 
tiffinfo doesn't display the contents of the colormap. However, 
comparing the 3 vectors libtiff returns with a hexdump of the file, 
libtiff is presenting the color-map in the same order it is stored in 
the file. This is correct, according the the TIFF V6.0 spec.
_______________________________________________
Tiff mailing list: Tiff@lists.maptools.org
http://lists.maptools.org/mailman/listinfo/tiff
http://www.remotesensing.org/libtiff/
