X-Account-Key: account1
X-UIDL: f6d9785560499f5b32bf61559e6023b9
X-Mozilla-Status: 0001
X-Mozilla-Status2: 00000000
X-Mozilla-Keys:                                                                                 
Received: from lists.maptools.org (lothlorien.howardsilvan.com [127.0.0.1])
	by mail.howardsilvan.com (Postfix) with ESMTPS id 1B12B6721AD
	for <faxguy@howardsilvan.com>; Wed,  4 Nov 2015 14:33:33 -0800 (PST)
Received: from lists.maptools.org ([94.23.4.142] helo=lists.maptools.org)
	by lothlorien.howardsilvan.com with SMTP (2.3.3); 4 Nov 2015	14:33:33 -0800
Received: from [10.1.0.241] (localhost.localdomain [127.0.0.1])
	by lists.maptools.org (Postfix) with ESMTP id C89D135C03D;
	Wed,  4 Nov 2015 17:32:46 -0500 (EST)
Received: from mout.web.de (mout.web.de [212.227.17.11])
	by lists.maptools.org (Postfix) with ESMTPS id 0842F35C023
	for <tiff@lists.maptools.org>; Wed,  4 Nov 2015 17:32:31 -0500 (EST)
Received: from [78.42.213.217]
	by 3capp-webde-bap03.server.lan (via HTTP);	Wed, 4 Nov 2015 23:32:51 +0100
MIME-Version: 1.0
Message-ID: <trinity-7cdeebea-5fc3-4f21-b695-adb964a23e12-1446676371137@3capp-webde-bap03>
From: sulaus@web.de
To: tiff@lists.maptools.org
Date: Wed, 4 Nov 2015 23:32:51 +0100
Importance: normal
Sensitivity: Normal
X-Priority: 3
X-Provags-ID: V03:K0:UxXkNdvM6LT/Y78g6jc642JpXh58jXlebDj/12VsHHp
	g90yC+AHqkaOmvrXcSrpb/0h3twPFBmtKRtyipGyIl6a061RYC
	aatbibB9g/4C1r9CcP2IozQMmeab538ar9sj6pM0uSrH4REl1n
	d6u9Z5bJVPGE7K6TWLMqGxoBEtYWugHgSn6HsDigbOibQiCgDN
	a21rq024Jm7jMDqq28Nca+1tQxQfKbAMtDYUs/DnJPBnEV49Zd
	ITH0kyRw/vDA/fl17L6W0a5WYTC5UnDvLnIo0gxCHoMO6+kDb3
	zRhK3M1H0FILvZQydIanr9HB4ie
X-UI-Out-Filterresults: notjunk:1;V01:K0:auUogJlhfo8=:o3M84PJ8BrJ2qXMQGgxIzj
	bp6JOhZ3yZi8U8JKqxpg89cJ4bkVpZ2+D4CZi4SEDuW2glS5nmjghbd8svu+16HzYVyzG7ctR
	d/UkWO2JYEZKg/5X0AoxH50mwO3cFq2awcLlkGL0HHsx5JFvM1eeiT2tHuj2bYMIUjMtBaTIi
	3kQgPypwY+P768YLeGfnMIL1U88XZ0O1XTB34bbxaiCBmfyXwwi/zbeLpDy47JpnDSYz4743K
	rJapt46a4wBeLN1/8owPY19Np5Qh+zrVENNLaXUAOl7RhSqhMS0lDKG5QLGS5iJ/tOmaMRIar
	ezXtuVofiN3ybxb46d7JQsCrpsoMYqfST+TY7yYO+oVt8MLf8GunGVkbvSib8YV7N58TIoFUV
	Re8Wn3iYfRZjUxFF+4ZEnUJ51L/jZgW6AqzPHypFyjEVbJFgZbzX0MDCGw7jvmYLy7QpXbNvK
	KKdIZ7Uqdg==
Subject: [Tiff] Wrong data type of GPS_IFD and EXIF_IFD tags and other
 issues
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>
Mime-version: 1.0
Sender: tiff-bounces@lists.maptools.org
Errors-To: tiff-bounces@lists.maptools.org
X-Assp-ID: lothlorien.howardsilvan.com m1-76413-06338
X-Assp-Session: 7FE07C20CC20 (mail 1)
X-Assp-Detected-RIP: 78.42.213.217, 212.227.17.11
X-Assp-Source-IP: 78.42.213.217
X-Assp-Envelope-From: tiff-bounces@lists.maptools.org
X-Assp-Intended-For: faxguy@howardsilvan.com
X-Assp-Version: 2.3.3(14029) on lothlorien.howardsilvan.com
X-Assp-Server-TLS: yes
X-Assp-Delay: not delayed (whitelisted); 4 Nov 2015 14:33:34 -0800
X-Assp-Whitelisted: Yes (whitelistdb)
Return-Path: tiff-bounces@lists.maptools.org
Content-Type: multipart/mixed;
	boundary="===============0796620278=="


--===============0796620278==
Content-Type: text/html; charset=UTF-8

<html><head></head><body><div style="font-family: Verdana;font-size: 12.0px;"><div>
<div>Hello,</div>

<div>&nbsp;</div>

<div>I am using LibTiff 4.x versions to save geo-information into the EXIF-GPS tags. Therefore, I added the GPS tags as custom defined tags like the already implemented exifFields.</div>

<div>&nbsp;</div>

<div>1.) Occasionally, I recognized that the data type of the tags GPS_IFD and EXIF_IFD are wrongly implemented in the LibTiff. Another tool issues warnings about that.</div>

<div>&nbsp;</div>

<div>They are specified as LONG values (see http://www.awaresystems.be/imaging/tiff/tifftags/exififd.html)&nbsp; but in tiff_dirinfo.c their data type is specified as TIFF_IFD8=13 instead of TIFF_LONG=4.</div>

<div>&nbsp;</div>

<div>&nbsp;</div>

<div>2.) The &ldquo;#define IGNORE 0&rdquo; in tif_dirread.c collides with the GPS tag &ldquo;VersionID=0&rdquo; and prevents the tag to be read. Therefore, the #define should be redefined for example to &ldquo;#define IGNORE 65534 //(-2)&rdquo;</div>

<div>&nbsp;</div>

<div>
<div>3,) Custom parameters (like the updated GPS tags) are defined using TIFFField entries. Here, the size and parameter type for reading and writing is defined.</div>

<div>I defined the GPS tags for latitude and longitude as custom fields with rational data type and the parameter precision for TIFFSetField() and TIFFGetField() as double-precision.</div>

<div>&nbsp;</div>

<div>{GPSTAG_LATITUDE, 3, 3,TIFF_RATIONAL, 0, &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; TIFF_SETGET_C0_DOUBLE, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 0, &quot;Latitude&quot;, NULL },</div>

<div>&nbsp;</div>

<div>I discovered that the rational values, even when passed or read with <strong>double</strong>-precision, are internally stored ALLWAYS as floating point <strong>single</strong> precision in &ldquo;tif-&gt;tif_dir.td_customValues&rdquo;.</div>

<div>This means that the LibTiff does not allow handling custom defined rational values in double precision, as necessary for latitude and longitude values in GPS tags, even if the rational representation would allow this precision.</div>

<div>Therefore I would like to recommend storing custom floating point variables (especially rational values) internal always as double-precision.</div>

<div>&nbsp;</div>
</div>

<div>I would appreciate, if someone could check that issue.</div>

<div>&nbsp;</div>

<div>Regards,</div>

<div>Su</div>
</div></div></body></html>

--===============0796620278==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

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


