Return-Path: <tiff-bounces@lists.maptools.org>
Received: from inas034.isp.belgacom.be (localhost [127.0.0.1])
        by inav002.isp.belgacom.be (8.12.11.20060308/8.12.11/Skynet-IN-AV-3.00) with ESMTP id kBKDlUpk005062
        for <joris.at.lebbeke@skynet.be>; Wed, 20 Dec 2006 14:47:30 +0100
        (envelope-from <tiff-bounces@lists.maptools.org>)
Received: from inmx017.isp.belgacom.be (inmx017.isp.belgacom.be [195.238.4.129])
        by inas034.isp.belgacom.be (8.12.11/8.12.11/Skynet-IN-AS-2.03) with ESMTP id kBKDlQjV018759
        for <joris.at.lebbeke@skynet.be>; Wed, 20 Dec 2006 14:47:27 +0100
        (envelope-from <tiff-bounces@lists.maptools.org>)
Received: from duke.maptools.org (r153.dmsolutions.ca [209.217.116.153] (may be forged))
        by inmx017.isp.belgacom.be (8.12.11.20060308/8.12.11/Skynet-IN-2.32) with ESMTP id kBKDl6Ib027694
        for <joris.at.lebbeke@skynet.be>; Wed, 20 Dec 2006 14:47:06 +0100
        (envelope-from <tiff-bounces@lists.maptools.org>)
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 kBKDP5Bv025826;
	Wed, 20 Dec 2006 08:26:41 -0500
Received: from poczta.o2.pl (poczta.o2.pl [193.17.41.142] (may be forged))
	by duke.maptools.org (8.12.11/8.12.10) with ESMTP id kBKDP04Y025815
	for <tiff@lists.maptools.org>; Wed, 20 Dec 2006 08:25:00 -0500
Received: from poczta.o2.pl (mx12 [127.0.0.1])
	by poczta.o2.pl (Postfix) with ESMTP id 8CFB1628190
	for <tiff@lists.maptools.org>; Wed, 20 Dec 2006 14:24:56 +0100 (CET)
Received: from [192.168.0.233] (inet20908na-3.eranet.pl [213.158.196.99])
	(using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits))
	(No client certificate requested)
	by poczta.o2.pl (Postfix) with ESMTP
	for <tiff@lists.maptools.org>; Wed, 20 Dec 2006 14:24:55 +0100 (CET)
Message-ID: <4589399B.6020700@go2.pl>
Date: Wed, 20 Dec 2006 14:24:43 +0100
From: mikk <mikk@go2.pl>
User-Agent: Thunderbird 1.5.0.8 (Windows/20061025)
MIME-Version: 1.0
To: tiff@lists.maptools.org
Content-Type: text/plain; charset=ISO-8859-2; format=flowed
Content-Transfer-Encoding: 7bit
Subject: [Tiff] Interpreting values in tdir_offset of TIFFDirEntry
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.00001e8c
X-MSP-STORE: Wed, 20 Dec 2006 14:47:40 +0100
Status:   

Hello,
I'm not sure I understand the way of interpreting values stored in the 
tdir_offset of TIFFDirEntry structure. According to the tiff.h comments 
for the TIFFDirEntry struct:
"...If the value is 4 bytes or less, then it is placed in the offset 
field to save space. If the value is less than 4 bytes, it is 
left-justified in the offset field."
When the IFD entry (a tag) is written into a TIFF file, and the data 
type size is 2 bytes (fe. TIFF_SHORT), and data length is 2, that makes 
4 bytes of data. I assume that the data itself is saved in the 
tdir_offset field. And what if the data type size is 1 byte (fe. 
TIFF_ASCII or TIFF_BYTE) and data length is less than or equal to 4? I 
assume that the data itself is saved in the tdir_offset. Am I right?

Thanks in advance,
mikk
_______________________________________________
Tiff mailing list: Tiff@lists.maptools.org
http://lists.maptools.org/mailman/listinfo/tiff
http://www.remotesensing.org/libtiff/
