Return-Path: <tiff-bounces@lists.maptools.org>
X-Original-To: info@awaresystems.be
Delivered-To: info@awaresystems.be
Received: from mx-r.b-one.net (mx-r.one.com [91.198.169.249])
	by mail9.b-one.net (Postfix) with ESMTP id A0C92400B7B
	for <info@awaresystems.be>; Tue, 11 May 2010 18:00:07 +0200 (CEST)
Received: by mx-r.b-one.net (Postfix, from userid 106)
	id 98E54194FF87; Tue, 11 May 2010 18:00:07 +0200 (CEST)
X-Virus-Scanned: by one.com
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-r.b-one.net (Postfix) with ESMTP id C3567194FF87 for
 <info@awaresystems.be>; Tue, 11 May 2010 18:00:06 +0200 (CEST)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by
 lists.maptools.org (Postfix) with ESMTP id D56961D4ACBF8; Tue, 11 May 2010
 10:59:27 -0500 (EST)
Received: from sasl.smtp.pobox.com (a-pb-sasl-quonix.pobox.com
 [208.72.237.25]) by lists.maptools.org (Postfix) with ESMTP id 29F521D18DE0F
 for <tiff@lists.maptools.org>; Tue, 11 May 2010 10:49:25 -0500 (EST)
Received: from sasl.smtp.pobox.com (unknown [127.0.0.1]) by
 a-pb-sasl-quonix.pobox.com (Postfix) with ESMTP id F28C1B24B8; Tue, 11 May
 2010 11:49:19 -0400 (EDT)
Received: from a-pb-sasl-quonix. (unknown [127.0.0.1]) by
 a-pb-sasl-quonix.pobox.com (Postfix) with ESMTP id DF50FB24B7; Tue, 11 May
 2010 11:49:18 -0400 (EDT)
Received: from [192.168.2.10] (unknown [67.71.155.51]) (using TLSv1 with
 cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested)
 by a-pb-sasl-quonix.pobox.com (Postfix) with ESMTPSA id 97C80B24B6; Tue, 11
 May 2010 11:49:17 -0400 (EDT)
Message-ID: <4BE97C7C.1060407@pobox.com>
Date: Tue, 11 May 2010 11:49:16 -0400
From: Frank Warmerdam <warmerdam@pobox.com>
User-Agent: Thunderbird 2.0.0.24 (X11/20100411)
MIME-Version: 1.0
To: Thomas Richter <thor@math.tu-berlin.de>
References: <4BE9788B.2020701@math.tu-berlin.de>
In-Reply-To: <4BE9788B.2020701@math.tu-berlin.de>
X-Pobox-Relay-ID:
 C28860FC-5D14-11DF-A600-D033EE7EF46B-06493634!a-pb-sasl-quonix.pobox.com
Cc: tiff@lists.maptools.org
Subject: Re: [Tiff] Tiff with varying bit depths
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

Thomas Richter wrote:
> Hi folks,
> 
> I currently have a need to read and write TIFF files with a varying bit 
> depth. To be specific, this is a BGR565 image packed into TIFF:
> 
> $ tiffdump out.tif
> out.tif:
> Magic: 0x4949 <little-endian> Version: 0x2a
> Directory 0: offset 8 (0x8) next 0 (0)
> ImageWidth (256) LONG (4) 1<64>
> ImageLength (257) LONG (4) 1<64>
> BitsPerSample (258) SHORT (3) 3<5 6 5>
> Compression (259) SHORT (3) 1<1>
> Photometric (262) SHORT (3) 1<2>
> StripOffsets (273) LONG (4) 1<140>
> SamplesPerPixel (277) SHORT (3) 1<3>
> RowsPerStrip (278) LONG (4) 1<64>
> StripByteCounts (279) LONG (4) 1<8192>
> SampleFormat (339) SHORT (3) 1<1>
> 
> 
> Obviously, the library does not support this, but what are my options if 
> I need to read this file? I'm not too keen to write a tiff-parser
> myself, unless I really really have to - and - I afraid - I really 
> really have to read this file in one way or another.
> 
> Is there a way to get at least hands on the raw stripe data without the 
> lib falling over? Failing that, what is the patch acceptance policy
> for libTIFF? Would you accept a patch that adds support for this, 
> probably in a limited way?

Thomas,

Have you investigated using TIFFReadRawTile() to read these tiles?   At
what point does libtiff fail with this file?

I don't anticipate the regular decompression/decoding logic working with
such a file in the near future, but I would like to see it be possible
to fetch the raw tile/strip data without too much difficulty.

Can you make one of these files available?

Best regards,
-- 
---------------------------------------+--------------------------------------
I set the clouds in motion - turn up   | Frank Warmerdam, warmerdam@pobox.com
light and sound - activate the windows | http://pobox.com/~warmerdam
and watch the world go round - Rush    | Geospatial Programmer for Rent

_______________________________________________
Tiff mailing list: Tiff@lists.maptools.org
http://lists.maptools.org/mailman/listinfo/tiff
http://www.remotesensing.org/libtiff/
