Return-Path: <tiff-bounces@lists.maptools.org>
Received: from inas016.isp.belgacom.be (localhost [127.0.0.1])
        by inav009.isp.belgacom.be (8.12.11/8.12.11/Skynet-IN-AV-3.00) with ESMTP id jB3EkP5r008557
        for <joris.at.lebbeke@skynet.be>; Sat, 3 Dec 2005 15:46:26 +0100
        (envelope-from <tiff-bounces@lists.maptools.org>)
Received: from inmx010.isp.belgacom.be (inmx010.isp.belgacom.be [195.238.4.73])
        by inas016.isp.belgacom.be (8.12.11/8.12.11/Skynet-IN-AS-2.03) with ESMTP id jB3EkNDB012912
        for <joris.at.lebbeke@skynet.be>; Sat, 3 Dec 2005 15:46:25 +0100
        (envelope-from <tiff-bounces@lists.maptools.org>)
Received: from duke.maptools.org (r153.dmsolutions.ca [209.217.116.153] (may be forged))
        by inmx010.isp.belgacom.be (8.12.11/8.12.11/Skynet-IN-2.32) with ESMTP id jB3EkFpA005397
        for <joris.at.lebbeke@skynet.be>; Sat, 3 Dec 2005 15:46:16 +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 jB3Eedjp026440;
	Sat, 3 Dec 2005 09:41:18 -0500
Received: from cgp.spb.edu (vlan3.cgp.spb.edu [195.70.196.207])
	by duke.maptools.org (8.12.11/8.12.10) with ESMTP id jB3EeaiW026432
	for <tiff@lists.maptools.org>; Sat, 3 Dec 2005 09:40:37 -0500
Received: from wg.pu.ru ([193.124.85.219] verified)
	by cgp.spb.edu (CommuniGate Pro SMTP 4.3c5)
	with ESMTP id 16922703 for tiff@lists.maptools.org;
	Sat, 03 Dec 2005 17:40:35 +0300
Received: (from uucp@localhost)
	by wg.pu.ru (8.9.1a/8.9.1) with UUCP id OAA20702
	for tiff@lists.maptools.org; Sat, 3 Dec 2005 14:40:35 GMT
Received: from ak4719.spb.edu (localhost [127.0.0.1])
	by ak4719.spb.edu (8.13.5/8.13.5/Debian-3) with ESMTP id jB3EK1RS015903
	for <tiff@lists.maptools.org>; Sat, 3 Dec 2005 17:20:01 +0300
Received: (from dron@localhost)
	by ak4719.spb.edu (8.13.5/8.13.5/Submit) id jB3Dxb7V013440
	for tiff@lists.maptools.org; Sat, 3 Dec 2005 16:59:37 +0300
From: Andrey Kiselev <dron@ak4719.spb.edu>
Date: Sat, 3 Dec 2005 16:59:37 +0300
To: tiff@lists.maptools.org
Subject: Re: [Tiff] Attempting to parse EXIF data (in a JPEG) with libtiff
Message-ID: <20051203135937.GD10737@ak4719.spb.edu>
Mail-Followup-To: tiff@lists.maptools.org
References: <043001c5f7d9$65a65290$6701a8c0@dimension4600c>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <043001c5f7d9$65a65290$6701a8c0@dimension4600c>
X-GnuPG-Key: http://www.srces.spb.org/dron/export.home.key
X-Face: "t+se9s~+y~[XUH]L|pmeO3Pt/Q@DNv**S, d@_1-C=}/,
	c%<3Qp]eu!ok<"2lYJm$!9qVcg F?7o*L; |$`6|Q|>Rt-cU%2_y@6tQ|`!Li}TsvZvEKx;
	>fuY=fc(=sX^`7Wmw8%SsR`AvM$a; 0U/eN\ P?B\FTyqD, 0np$U2!*'z_4D,
	VPlFf?bN0&zYf"zF0s!7Tl7?$we)xD0@lL>[h|8bhys0i.g|zLnu@C
	Ti@d]i=[!:j1CB\5/TF[m]`lfHfaqSN[0qn@T3zeosV/[LAss{@p_?],x*j8P_9t[}uHD^X-;
	j~\M! gyTly;fj`}&Y~i{<#bN.#QmkE}#T`dxP.I1\.)_MEN{@#W
User-Agent: Mutt/1.5.9i
X-Virus-Scanned: ClamAV version 0.87, clamav-milter version 0.87 on ak4719
X-Virus-Status: Clean
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.00000ed7
X-MSP-STORE: Sat, 03 Dec 2005 15:46:28 +0100
Status:   

On Sat, Dec 03, 2005 at 02:15:49AM -0500, Joshua Muskovitz wrote:
> I'm trying to implement an JPEG/EXIF parser using libtiff.
> Separately, I am able to extract the EXIF block from the source jpeg
> image, and I can see that it has the proper "II" preamble for TIFF.  I
> can also see the textual EXIF data within the block.
> 
> When I try to parse the data with libtiff, I fail in this logic in
> TIFFReadDirectory, called from TIFFClientOpen:
> 
>    if (!TIFFFieldSet(tif, FIELD_IMAGEDIMENSIONS)) {
>        MissingRequired(tif, "ImageLength");
>        goto bad;
>    }
> 
> which fails, and then I'm dumped out of the file and unable to parse
> it. Now valid EXIF blocks supposedly have no image data in the 0th
> IFD, and I suspect this is the reason it chokes.
> 
> As a reality check, I *am* able to parse actual TIFF image files using
> my libtiff wrappers, so I have confidence that that isn't the problem.
> 
> Am I nuts to be attempting this in the first place?  Is there
> something obvious I'm missing here?

Joshua,

The current implementation does not allow to read custom directories.
There will be a special call TIFFReadCustomDirectory() to read arbitrary
IFD, but it is not implemented yet.

Regards,
Andrey


-- 
Andrey V. Kiselev
Home phone:  +7 812 5970603  ICQ# 26871517
_______________________________________________
Tiff mailing list: Tiff@lists.maptools.org
http://lists.maptools.org/mailman/listinfo/tiff
http://www.remotesensing.org/libtiff/
