Return-Path: <awaresystems.be+caf_=filtered=awaresystems.be@gmail.com>
Delivered-To: filtered@awaresystems.be
Received: from mx1.pub.mailpod2-cph3.one.com ([10.27.25.11])
	by mailstorage18.cst.mailpod2-cph3.one.com with LMTP id WG7tLd6JEVy8mAAAQS8vrQ
	for <filtered@awaresystems.be>; Wed, 12 Dec 2018 22:21:18 +0000
X-HalOne-ID: 3e5b056e-fe5c-11e8-b0ec-e0d848957041
Received: from mail-yb1-f170.google.com (unknown [209.85.219.170])
	by mx1.pub.mailpod2-cph3.one.com (Halon) with ESMTPS
	id 3e5b056e-fe5c-11e8-b0ec-e0d848957041;
	Wed, 12 Dec 2018 22:21:17 +0000 (UTC)
Received: by mail-yb1-f170.google.com with SMTP id k136so17895ybk.1
        for <filtered@awaresystems.be>; Wed, 12 Dec 2018 14:21:17 -0800 (PST)
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=1e100.net; s=20161025;
        h=x-gm-message-state:delivered-to:dkim-signature:mime-version
         :references:in-reply-to:from:date:message-id:to:subject:precedence
         :list-id:list-unsubscribe:list-post:list-help:list-subscribe
         :errors-to:sender;
        bh=0/wWxP7gG+3Zg/UB/bZDg9655jX1TIPyaZeDR9xlAmQ=;
        b=ITkRcahKwsTFjLL5TqAIKDS9nQvBwkSyv1zAkPcEAgdsx6TqgCFpPNoC5obhEjrPve
         e9r4Nwrkz5va3ongSZX+yABH0uC+ZaV608Y51Rh8NpBP5mgdpbceDuqek3X593Fado6l
         8XevnEn315cNvgR+ZflSJqflFGl+2qKSbFjrkhK0+sZbGftM3dnUCHsOAxCDP/72teJ9
         twumpvyEzpPbbIynvXCZDhEWctoRRJX690gVtTApk/d4foMGCVHn5kt8jnqOAhOkS3Vv
         saC2tqkjXWUPM3bdcL0cRHqcMalsf+Vob9eeZQI8VAEu5UV2a86vz02wb18+haLu1WFn
         UUZg==
X-Gm-Message-State: AA+aEWaJ+5VGO0ciOyiICx3HgYJdq50UuRIB3rEgE3jaMGjNC6wlvvKl
	grtG46SH80tB+d5i+ZAAQEeapls/k7Ne/Veqf8DToPDrvxCouuc=
X-Received: by 2002:a25:4e45:: with SMTP id c66mr8114341ybb.380.1544653276573;
        Wed, 12 Dec 2018 14:21:16 -0800 (PST)
X-Forwarded-To: filtered@awaresystems.be
X-Forwarded-For: awaresystems.be@gmail.com filtered@awaresystems.be
Delivered-To: awaresystems.be@gmail.com
Received: by 2002:a25:2943:0:0:0:0:0 with SMTP id p64csp40956ybp;
        Wed, 12 Dec 2018 14:21:15 -0800 (PST)
X-Google-Smtp-Source: AFSGD/Vn6ctzWIhl2wv17G6R7Gk7fYvag9zXA0O31+xg18Vw3kzBE+mU/Bs7dFUwKNjzJl6sNIOG
X-Received: by 2002:a62:c101:: with SMTP id i1mr21818309pfg.80.1544653275135;
        Wed, 12 Dec 2018 14:21:15 -0800 (PST)
ARC-Seal: i=1; a=rsa-sha256; t=1544653275; cv=none;
        d=google.com; s=arc-20160816;
        b=Xu0SU7+W9/+wAfLnQoxJWyUPaQ07vi8Tp9LyqSo0r8Yx0a4fHu6SMc6iPUw56tTzj+
         Tvmr/Yy0GW3lhbNUWWPyCWkXv8+CMUTD3MQfacpmDjyjksdybku6bdAhrJh9/h/tT67S
         4spoVaSgaUABT7bQK95dTmGklcAunx34HHtITz/y8pFegVi73Gc0U7mhc1M10fjqfJno
         aUHdInmfC/UyvCvkXaBhFYHAd6EcIBbURyPLwGVQeqTGqjrU3HyYqjO+rG23cHRdR5xh
         aSgUNOb1pbdz/fEZg1I1aVpQjBPSK9yIt9BIHwzcz/rePo+P42zHHI+n7qoSuRkZ0qxK
         oG7w==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816;
        h=sender:errors-to:list-subscribe:list-help:list-post
         :list-unsubscribe:list-id:precedence:subject:to:message-id:date:from
         :in-reply-to:references:mime-version:dkim-signature;
        bh=0/wWxP7gG+3Zg/UB/bZDg9655jX1TIPyaZeDR9xlAmQ=;
        b=DbWztwT/JjHnu67qvwywsFB05PvbtvdGoeDsWnOhhEhH6H/WgHNygWJEd33f4RcsfC
         a2abgJWN4FMHzMq7UTAhWYDsf4cNBHBLqdH9cpO7y8ShHkROa6Rk34djgAlLO0RecKRD
         0mYIN59vpEOQv5xdOcpbTlyS45pM/McqsHdjale4luMagQx/640wF1B6woJG7F2/T/3c
         2qzIfgpCbA5Zi5VMd0fmcQnHhAdZ2yx9PReUqELBMNJwPemqNXqZmPtQl8S0v1+e2GKK
         QSe+keHXVcV+gi948Ae6ISw50t/+JOC9kDIWMhLcGy1rcHLnmS+GSzwQ/sYWh7PXj+Go
         3qQg==
ARC-Authentication-Results: i=1; mx.google.com;
       dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20161025 header.b=gFxh3Lz7;
       spf=pass (google.com: domain of tiff-bounces@lists.osgeo.org designates 140.211.15.3 as permitted sender) smtp.mailfrom=tiff-bounces@lists.osgeo.org;
       dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com
Return-Path: <tiff-bounces@lists.osgeo.org>
Received: from lists.osgeo.org (osgeo6.osgeo.osuosl.org. [140.211.15.3])
        by mx.google.com with ESMTPS id n3si11447plk.328.2018.12.12.14.21.14
        (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);
        Wed, 12 Dec 2018 14:21:15 -0800 (PST)
Received-SPF: pass (google.com: domain of tiff-bounces@lists.osgeo.org designates 140.211.15.3 as permitted sender) client-ip=140.211.15.3;
Authentication-Results: mx.google.com;
       dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20161025 header.b=gFxh3Lz7;
       spf=pass (google.com: domain of tiff-bounces@lists.osgeo.org designates 140.211.15.3 as permitted sender) smtp.mailfrom=tiff-bounces@lists.osgeo.org;
       dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com
Received: from osgeo6.osgeo.osuosl.org (localhost [127.0.0.1])
	by lists.osgeo.org (Postfix) with ESMTP id 8E1A16061DA0;
	Wed, 12 Dec 2018 14:21:13 -0800 (PST)
Received: from mail-qt1-f177.google.com (mail-qt1-f177.google.com
 [209.85.160.177])
 by lists.osgeo.org (Postfix) with ESMTPS id 8C2AE6067B8F
 for <tiff@lists.osgeo.org>; Wed, 12 Dec 2018 14:21:12 -0800 (PST)
Received: by mail-qt1-f177.google.com with SMTP id n32so22366392qte.11
 for <tiff@lists.osgeo.org>; Wed, 12 Dec 2018 14:21:12 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;
 h=mime-version:references:in-reply-to:from:date:message-id:subject:to;
 bh=JBfFy5YM1Qqys1I++ZwS38y/T/vzx3keDb+Dt5Kw13c=;
 b=gFxh3Lz7kCOWtFOK/tE17wgAh1aCOd8s9tSjXea5pab7WUNM2Ziao9/3caUBE2Q3po
 IFa2y/7XSljPoh+P+Y/VFdY+39BesnFdZX0CVI/qvn5SigsOeU2KvFqLj99cCmX0NDsd
 MO4WXstNCGsK2bL1kupcWjE5LGxXVpHDIM4Yt0y/JqX3wo/xZpFJj3iSARHSD0BSVhMN
 Gaxw2Ls3Vp0wI+zScoLCRiTfKqIbSGP7gaetXrDs5Q9XQPooVIZ85VV3G4+NJ4Da0LsY
 QQcI77ql1yc3fwwoPAt7ZyXlUWaYwA1wN3GJ67+171+v0lQVtuk75HrCp4O+6C3+b9xh
 XL3g==
X-Received: by 2002:aed:31a3:: with SMTP id 32mr22116780qth.234.1544653271535; 
 Wed, 12 Dec 2018 14:21:11 -0800 (PST)
MIME-Version: 1.0
References: <CAJytUTn5sf60k84wuBpp++RZBsbEub_kcGPMn427GZZ90pyChQ@mail.gmail.com>
In-Reply-To: <CAJytUTn5sf60k84wuBpp++RZBsbEub_kcGPMn427GZZ90pyChQ@mail.gmail.com>
From: Bardas Georgios <geobar2010@gmail.com>
Date: Thu, 13 Dec 2018 00:21:00 +0200
Message-ID: <CAJytUTmBNjEKTmZww4nGiJ=Gzysw2aWkrHxuYy+ffKSuqwN7JQ@mail.gmail.com>
To: tiff@lists.osgeo.org
Subject: [Tiff] Fwd: TIFFSetDirectory and TIFFCurrentDirectory issues in
	libtif 4.0.10
X-BeenThere: tiff@lists.osgeo.org
X-Mailman-Version: 2.1.20
Precedence: list
List-Id: TIFF and libtiff discussion <tiff.lists.osgeo.org>
List-Unsubscribe: <https://lists.osgeo.org/mailman/options/tiff>,
 <mailto:tiff-request@lists.osgeo.org?subject=unsubscribe>
List-Post: <mailto:tiff@lists.osgeo.org>
List-Help: <mailto:tiff-request@lists.osgeo.org?subject=help>
List-Subscribe: <https://lists.osgeo.org/mailman/listinfo/tiff>,
 <mailto:tiff-request@lists.osgeo.org?subject=subscribe>
Content-Type: multipart/mixed; boundary="===============7707889195493391154=="
Errors-To: tiff-bounces@lists.osgeo.org
Sender: "Tiff" <tiff-bounces@lists.osgeo.org>

--===============7707889195493391154==
Content-Type: multipart/alternative; boundary="0000000000008d150a057cda9d4b"

--0000000000008d150a057cda9d4b
Content-Type: text/plain; charset="UTF-8"

Hello gentlemen,
I have been working in Libtiff for one or two weeks now, and i am stuck
into some mysterious problem. I am using libtiff 4.0.10 in Visual Studio
2017 and just trying to do the following task: I am willing to fill the
first page (directory) with some data (black tiles (256x256) for example)
and then i need to read that information and write it on the next page
decimated by two. In fact all i am trying to make is a tiled pyramid tiff
image which the level 0 is so big i can parse it only through tiles. My
question is: Is it possible to write one directory and then return back and
read from it to write that data on the next directory?

Currenlty i am using TIFFSetDirectory to try and get back to the previous
one, but unfortunately it fails (TIFFSetDirectory(tiff,0) returns 0) after
i have saved the previous' directory's data with TIFFWriteDirectory.

On the other hand, when i use TIFFCurrentDirectory on the first directory i
write, strangely i get "65536" instead of 0 (probably -1 in uint), why? And
when i write this folder it goes to folder 0, then 1 etc. To sum up
TIFFCurrentDirectory seems to return n-1, where n is the current
directory's number.

Can anyone help me?
Thanks a lot,
George.

--0000000000008d150a057cda9d4b
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div dir=3D"auto"><div class=3D"gmail_quote" dir=3D"auto"><div dir=3D"ltr">=
Hello gentlemen,<br></div><div dir=3D"ltr"><div>I have been working in Libt=
iff for one or two weeks now, and i am stuck into some mysterious problem. =
I am using libtiff 4.0.10 in Visual Studio 2017 and just trying to do the f=
ollowing task: I am willing to fill the first page (directory) with some da=
ta (black tiles (256x256) for example) and then i need to read that informa=
tion and write it on the next page decimated by two. In fact all i am tryin=
g to make is a tiled pyramid tiff image which the level 0 is so big i can p=
arse it only through tiles. My question is: Is it possible to write one dir=
ectory and then return back and read from it to write that data on the next=
 directory?</div><div><br></div><div>Currenlty i am using TIFFSetDirectory =
to try and get back to the previous one, but unfortunately it fails (TIFFSe=
tDirectory(tiff,0) returns 0) after i have saved the previous&#39; director=
y&#39;s data with TIFFWriteDirectory.=C2=A0</div><div><br></div><div>On the=
 other hand, when i use TIFFCurrentDirectory on the first directory i write=
, strangely i get &quot;65536&quot; instead of 0 (probably -1 in uint), why=
? And when i write this folder it goes to folder 0, then 1 etc. To sum up T=
IFFCurrentDirectory seems to return n-1, where n is the current directory&#=
39;s number.</div><div><br></div><div>Can anyone help me?</div><div>Thanks =
a lot,</div><div>George.</div></div>
</div></div>

--0000000000008d150a057cda9d4b--

--===============7707889195493391154==
Content-Type: text/plain; charset="utf-8"
MIME-Version: 1.0
Content-Transfer-Encoding: base64
Content-Disposition: inline

X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX18KVGlmZiBtYWls
aW5nIGxpc3QKVGlmZkBsaXN0cy5vc2dlby5vcmcKaHR0cHM6Ly9saXN0cy5vc2dlby5vcmcvbWFp
bG1hbi9saXN0aW5mby90aWZmCg==

--===============7707889195493391154==--
