Return-Path: <tiff-bounces@lists.maptools.org>
Received: from mailgate001.isp.belgacom.be (mailgate001.isp.belgacom.be [195.238.6.86])
        by inmx005.isp.belgacom.be (8.12.11.20060308/8.12.11/Skynet-IN-2.32) with ESMTP id l62J1Y3O030166
        for <joris.at.lebbeke@skynet.be>; Mon, 2 Jul 2007 21:01:35 +0200
        (envelope-from <tiff-bounces@lists.maptools.org>)
Received: from r153.dmsolutions.ca (HELO duke.maptools.org) ([209.217.116.153])
  by in.mx.skynet.be with ESMTP; 02 Jul 2007 21:01:34 +0200
Received: from duke.maptools.org (duke.maptools.org [127.0.0.1])
	by duke.maptools.org (8.12.11/8.12.10) with ESMTP id l62InjWw004095;
	Mon, 2 Jul 2007 14:49:54 -0400
Received: from pd4mo2so.prod.shaw.ca (shawidc-mo1.cg.shawcable.net
	[24.71.223.10])
	by duke.maptools.org (8.12.11/8.12.10) with ESMTP id l62InhXJ004092
	for <tiff@lists.maptools.org>; Mon, 2 Jul 2007 14:49:43 -0400
Received: from pd4mr5so.prod.shaw.ca (pd4mr5so-qfe3.prod.shaw.ca [10.0.141.50])
	by l-daemon (Sun ONE Messaging Server 6.0 HotFix 1.01 (built Mar 15
	2004))
	with ESMTP id <0JKK003UCEYUVZC0@l-daemon> for tiff@lists.maptools.org;
	Mon, 02 Jul 2007 12:49:42 -0600 (MDT)
Received: from pn2ml2so.prod.shaw.ca ([10.0.121.146])
	by pd4mr5so.prod.shaw.ca (Sun Java System Messaging Server 6.2-7.05
	(built Sep
	5 2006)) with ESMTP id <0JKK0000FEYT3Y71@pd4mr5so.prod.shaw.ca> for
	tiff@lists.maptools.org; Mon, 02 Jul 2007 12:49:42 -0600 (MDT)
Received: from [192.168.0.7] ([24.80.241.128])
	by l-daemon (Sun ONE Messaging Server 6.0 HotFix 1.01 (built Mar 15
	2004))
	with ESMTP id <0JKK00E1KEYSFXF0@l-daemon> for tiff@lists.maptools.org;
	Mon, 02 Jul 2007 12:49:40 -0600 (MDT)
Date: Mon, 02 Jul 2007 11:49:58 -0700
From: Steve Bougerolle <steveb@sebgitech.com>
Subject: Re: [Tiff] Old corrupted TIFF data - "Can not read directory count"
In-reply-to: <07da01c7bcd8$75af0270$7a6bd9a6@gateway>
To: tiff@lists.maptools.org
Message-id: <468948D6.4000706@sebgitech.com>
Organization: SEB Global Infotech Inc.
MIME-version: 1.0
Content-type: text/plain; charset=UTF-8; format=flowed
Content-transfer-encoding: 7bit
References: <46893D54.2040805@sebgitech.com>
	<07da01c7bcd8$75af0270$7a6bd9a6@gateway>
User-Agent: Thunderbird 2.0.0.0 (X11/20070326)
X-BeenThere: tiff@lists.maptools.org
X-Mailman-Version: 2.1.4
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>
Sender: tiff-bounces@lists.maptools.org
Errors-To: tiff-bounces@lists.maptools.org
X-UIDL: 000000000023ceae.000024e6
X-MSP-STORE: Mon, 02 Jul 2007 21:01:44 +0200
Status:   


This file is 16822272 bytes in size.  The field points to 16823130, just
past it (858 bytes).

Some of the other files I've looked at basically the same pattern as
below, with different (wrong) values for that offset.  For example, I've
got one here that's 17149952 bytes in size and has offset pointer
84B20501, which translates to 17150596 - again, just past the end of the
file (644 bytes).


Kevin Myers wrote:
> Hi Steve,
> 
> What is your file size on disk?  Are you reading the bytes backwards?  
> The 4 bytes that you gave below only indicate a 16 MB offset (Intel hex 
> 01 00 b3 5a), so that could easily be realistic...
> 
> HTH,
> Kevin M.
> 
> 
> ----- Original Message ----- From: "Steve Bougerolle" 
> <steveb@sebgitech.com>
> To: <tiff@lists.maptools.org>
> Sent: Monday, July 02, 2007 13:00
> Subject: [Tiff] Old corrupted TIFF data - "Can not read directory count"
> 
> 
>>
>> Hi all
>>
>> I've got a bunch of TIFF files created back in 1998, which I find I 
>> can't read any more.  The error from libtiff is "Can not read 
>> directory count" and I haven't been able to rebuild whatever old 
>> library these were made with, so now I'm looking at the file format 
>> trying to work out what went wrong.  If any of you can help me along 
>> that'd be much appreciated!
>>
>> I've attached the first few rows of a hex dump at the bottom of this 
>> email.  Here's what I've puzzled out about the data so far:
>>
>> 49 49 2A 00 - The usual first four bytes
>>
>> 5A B3 00 01 - Should be the directory offset?  Can't be valid, though,
>>               because it points past the end of the file.  I haven't
>>               been able to figure out what else this might identify.
>>
>> Date string - the last byte is zero so I assume it's written out with
>>               null termination.  This is the date the image was created,
>>               as best I remember.
>>
>> 60 09 00 00 - no idea what all this is
>> 01 00 00 00
>> 60 09 00 00
>> 01 00 00 00
>> 08 00 08 00
>>
>> (then it trails off into less regular stuff)
>>
>> Does this form suggest anything to anybody?  I think these files were 
>> created on Linux using libtiff (around version 3.5.5) but I'm not sure 
>> of it. They might also have come from PaintShopPro as I was still 
>> using that for some work back then.
>>
>> The actual hex dump, first 64 bytes:
>>
>> 49 49 2a 00 5a b3 00 01  31 39 39 38 3a 31 32 3a  |II*.Z...1998:12:|
>> 31 38 20 30 36 3a 32 35  3a 35 36 00 60 09 00 00  |18 06:25:56.`...|
>> 01 00 00 00 60 09 00 00  01 00 00 00 08 00 08 00  |....`...........|
>> 08 00 ba 08 00 00 72 d1  00 00 af 97 01 00 c5 62  |......r........b|
>>
>> Thanks for any help!
>>
>> -- 
>> Steve Bougerolle <steveb@sebgitech.com>
>> http://www.sebgitech.com
>> http://www.bougerolle.net
>> _______________________________________________
>> Tiff mailing list: Tiff@lists.maptools.org
>> http://lists.maptools.org/mailman/listinfo/tiff
>> http://www.remotesensing.org/libtiff/
>>
>>
> 
> 
> 


-- 
Steve Bougerolle <steveb@sebgitech.com>
http://www.sebgitech.com
http://www.bougerolle.net

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