Return-Path: <awaresystems.be+caf_=filtered=awaresystems.be@gmail.com>
Delivered-To: filtered@awaresystems.be
Received: from mx-q.one.com (mx-q.one.com [91.198.169.248])
	by mail6.local (Postfix) with ESMTP id 09CF380103402
	for <filtered@awaresystems.be>; Thu, 29 Nov 2012 11:54:05 +0100 (CET)
X-Virus-Scanned: by one.com
X-Amavis-Alert: BAD HEADER SECTION, Duplicate header field: "MIME-Version"
Received-SPF: pass (mx-q: domain of awaresystems.be+caf_=filtered=awaresystems.be@gmail.com designates 209.85.223.176 as permitted sender)
X-Greylist: whitelisted by SQLgrey-1.8.0-rc2
Received: from mail-ie0-f176.google.com (mail-ie0-f176.google.com [209.85.223.176])
	by mx-q.one.com (Postfix) with ESMTP id 3A276BDE6F8
	for <filtered@awaresystems.be>; Thu, 29 Nov 2012 10:54:05 +0000 (UTC)
Received: by mail-ie0-f176.google.com with SMTP id 13so19818784iea.21
        for <filtered@awaresystems.be>; Thu, 29 Nov 2012 02:54:04 -0800 (PST)
Received: by 10.50.140.106 with SMTP id rf10mr24848003igb.48.1354186444183;
        Thu, 29 Nov 2012 02:54:04 -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 10.42.44.135 with SMTP id b7csp735730icf;
        Thu, 29 Nov 2012 02:54:03 -0800 (PST)
Received: by 10.50.189.193 with SMTP id gk1mr22740953igc.22.1354186442838;
        Thu, 29 Nov 2012 02:54:02 -0800 (PST)
Received-SPF: neutral (google.com: 91.198.169.249 is neither permitted nor denied by best guess record for domain of tiff-bounces@lists.maptools.org) client-ip=91.198.169.249;
Received: by 10.13.70.26 with POP3 id x26mf7398424iak.5;
        Thu, 29 Nov 2012 02:54:02 -0800 (PST)
X-Gmail-Fetch-Info: info@awaresystems.be 1 pop.awaresystems.be 110 info@awaresystems.be
Delivered-To: info@awaresystems.be
Received: from mx-r.one.com (mx-r.one.com [91.198.169.249])
	by mail6.local (Postfix) with ESMTP id A94C480103402
	for <info@awaresystems.be>; Thu, 29 Nov 2012 11:40:37 +0100 (CET)
X-Amavis-Alert: BAD HEADER SECTION, Duplicate header field: "MIME-Version"
X-Greylist: domain auto-whitelisted by SQLgrey-1.8.0-rc2
Received: from lists.maptools.org (lists.maptools.org [65.39.174.144])
	by mx-r.one.com (Postfix) with ESMTP id 17E7B133029B
	for <info@awaresystems.be>; Thu, 29 Nov 2012 10:40:36 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
	by lists.maptools.org (Postfix) with ESMTP id 6C06843A052;
	Thu, 29 Nov 2012 05:39:02 -0500 (EST)
Received: from mail-lb0-f172.google.com (mail-lb0-f172.google.com
	[209.85.217.172])
	by lists.maptools.org (Postfix) with ESMTPS id 8CA2543A052
	for <tiff@lists.maptools.org>; Thu, 29 Nov 2012 05:10:16 -0500 (EST)
Received: by mail-lb0-f172.google.com with SMTP id y2so12467323lbk.3
	for <tiff@lists.maptools.org>; Thu, 29 Nov 2012 02:10:20 -0800 (PST)
MIME-Version: 1.0
Received: by 10.112.26.167 with SMTP id m7mr9469379lbg.43.1354183820528; Thu,
	29 Nov 2012 02:10:20 -0800 (PST)
Received: by 10.152.13.227 with HTTP; Thu, 29 Nov 2012 02:10:20 -0800 (PST)
In-Reply-To: <50B6841C.1060802@comcast.net>
References: <CADH5xWrpZzSL3GWgD77i1eN2YqD+aAzDmQ7DY9_0YaE7kaJcNw@mail.gmail.com>
	<50B66055.7010001@comcast.net>
	<CADH5xWpvqp-c3VPPLCARw_Coi2eokSQjC9=AWqFnp+pSETm5ag@mail.gmail.com>
	<50B6841C.1060802@comcast.net>
Date: Thu, 29 Nov 2012 11:10:20 +0100
Message-ID: <CADH5xWoDJ7PXUPr7tf33OHy-=TTFNbMaNrajtLqcYax7BwAn-g@mail.gmail.com>
From: Jorge Martin <jormarfe@gmail.com>
To: David Burken <dburken@comcast.net>
Cc: "tiff@lists.maptools.org" <tiff@lists.maptools.org>
Subject: Re: [Tiff] Error in TIFFWriteDirectory when writting multi page TIFF
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>
Content-Type: multipart/mixed; boundary="===============0957637549=="
Mime-version: 1.0
Sender: tiff-bounces@lists.maptools.org
Errors-To: tiff-bounces@lists.maptools.org

--===============0957637549==
Content-Type: multipart/alternative; boundary=bcaec554dbd8954c4f04cf9f7dcd

--bcaec554dbd8954c4f04cf9f7dcd
Content-Type: text/plain; charset=ISO-8859-1

Hello Dave,

         You were right!! I have re-compile my gdal library using the
external libtiff and it runs correctly.


         However, I had some problems trying to compile gdal-1.8.1 against
an external libtiff and libgeotiff. There is a problem with libtool when
gdal is generating libgdal.lai because gdal set a wrong path to the
external libtiff. To avoid the problem, it is necessary to use system
libtool.

         Thank you very much!!!

Best Regards,

Jorge


2012/11/28 David Burken <dburken@comcast.net>

>  If you build your own gdal you can point it to external lib with
> --with-libtiff and --with-geotiff in the ./configure line.
>
> Take care,
> Dave
>
>
>
>
> On 11/28/2012 03:19 PM, Jorge Martin wrote:
>
> Hello,
>
>          Thank you very much for your help!!!
>
>          I have discovered that the problem is only appearing in a code
> that is linked to libtiff and also to libgdal. In the other cases the
> executable is not linked to gdal library.
>
>          I have removed gdal library in the code that reproduces the
> problem and it disappears, the multi-file is written correctly.
>
>          I think that it could also disappears if I change the order of
> linking libtiff and libgdal libraries in the makefile.
>
>
>  Best Regards,
>
>
>  Jorge
>
>
> 2012/11/28 David Burken <dburken@comcast.net>
>
>>  Hi,
>>
>> You may need  a TIFFFlush call.  This class writes subfiles (overviews)
>> if you want to look at it.
>>
>>
>> http://trac.osgeo.org/ossim/browser/trunk/ossim/src/ossim/imaging/ossimTiffOverviewBuilder.cpp
>>
>> Best of luck,
>> Dave
>>
>>
>>
>> On 11/28/12 11:45 AM, Jorge Martin wrote:
>>
>>  Hello,
>>
>>
>>      I am trying to write multi-file TIFF. In some cases I am obtaining
>> the following error from TIFFWriteDirectory function:
>>
>>  TIFFLinkDirectory: Error fetching directory count.
>>
>>       TIFFReadDirectory help says:
>>
>>        "*Error fetching directory count*. A read error occurred when
>> fetching the directory count field for a previous directory. This can occur
>> when setting up a link to the directory that is being written."
>>
>>      But I do not understand the origin of the error and how to solve
>> this problem, because it only writes the first image.
>>
>>      Does anyone know how to solve this error?
>>
>>  Best Regards,
>>
>>  Jorge
>>
>>
>>  _______________________________________________
>> Tiff mailing list: Tiff@lists.maptools.orghttp://lists.maptools.org/mailman/listinfo/tiffhttp://www.remotesensing.org/libtiff/
>>
>>
>>
>
>

--bcaec554dbd8954c4f04cf9f7dcd
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable

Hello Dave,<div><br></div><div>=A0 =A0 =A0 =A0 =A0You were right!! I have r=
e-compile my <span class=3D"" style>gdal</span> library using the external =
<span class=3D"" style>libtiff</span> and it runs correctly.=A0</div><div><=
br></div><div>
<br></div><div>=A0 =A0 =A0 =A0 =A0However, I had some problems trying to co=
mpile <span class=3D"" style>gdal</span>-1.8.1 against an external <span cl=
ass=3D"" style>libtiff</span> and <span class=3D"" style>libgeotiff</span>.=
 There is a problem with <span class=3D"" style>libtool</span> when <span c=
lass=3D"" style>gdal</span> is generating <span class=3D"" style>libgdal</s=
pan>.<span class=3D"" style>lai</span> because <span class=3D"" style>gdal<=
/span> set a wrong path to the external <span class=3D"" style>libtiff</spa=
n>. To avoid the problem, it is necessary to use system <span class=3D"" st=
yle>libtool</span>.=A0</div>
<div>=A0 =A0</div><div>=A0 =A0 =A0 =A0 =A0Thank you very much!!!</div><div>=
<br></div><div>Best Regards,</div><div><br></div><div>Jorge<br><div class=
=3D"gmail_extra"><br><br><div class=3D"gmail_quote">2012/11/28 David <span =
class=3D"" style>Burken</span> <span dir=3D"ltr">&lt;<a href=3D"mailto:dbur=
ken@comcast.net" target=3D"_blank"><span class=3D"" style>dburken</span>@<s=
pan class=3D"" style>comcast</span>.net</a>&gt;</span><br>
<blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1p=
x #ccc solid;padding-left:1ex">
 =20
   =20
 =20
  <div bgcolor=3D"#FFFFFF" text=3D"#000000">
    If you build your own gdal you can point it to external lib with
    --with-libtiff and --with-geotiff in the ./configure line.<br>
    <br>
    Take care,<br>
    Dave<div><div class=3D"h5"><br>
    <br>
    <br>
    <br>
    <div>On 11/28/2012 03:19 PM, Jorge Martin
      wrote:<br>
    </div>
    <blockquote type=3D"cite">Hello,
      <div><br>
      </div>
      <div>=A0 =A0 =A0 =A0 Thank you very much for your help!!!</div>
      <div><br>
      </div>
      <div>=A0 =A0 =A0 =A0 I have discovered that the problem is only appea=
ring
        in a code that is linked to <span>libtiff</span>
        and also to <span>libgdal</span>. In the
        other cases the executable is not linked to <span>gdal</span> libra=
ry.=A0</div>
      <div><br>
      </div>
      <div>=A0 =A0 =A0 =A0 I have removed <span>gdal</span>
        library in the code that reproduces the problem and it
        disappears, the <span>multi</span>-file is
        written correctly.=A0</div>
      <div><br>
      </div>
      <div>=A0 =A0 =A0 =A0 I think that it could also disappears if I chang=
e the
        order of linking <span>libtiff</span> and <span>libgdal</span> libr=
aries in the makefile.</div>
      <div><br>
      </div>
      <div><br>
      </div>
      <div>Best Regards,</div>
      <div><br>
      </div>
      <div><br>
      </div>
      <div>Jorge<br>
        <div class=3D"gmail_extra"><br>
          <br>
          <div class=3D"gmail_quote">2012/11/28 David <span>Burken</span> <=
span dir=3D"ltr">&lt;<a href=3D"mailto:dburken@comcast.net" target=3D"_blan=
k"><span>dburken</span>@<span>comcast</span>.net</a>&gt;</span><br>
            <blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;bo=
rder-left:1px #ccc solid;padding-left:1ex">
              <div bgcolor=3D"#FFFFFF" text=3D"#000000">
                <div>Hi,<br>
                  <br>
                  You may need=A0 a TIFFFlush call.=A0 This class writes
                  subfiles (overviews) if you want to look at it.<br>
                  <br>
                  <a href=3D"http://trac.osgeo.org/ossim/browser/trunk/ossi=
m/src/ossim/imaging/ossimTiffOverviewBuilder.cpp" target=3D"_blank">http://=
trac.osgeo.org/ossim/browser/trunk/ossim/src/ossim/imaging/ossimTiffOvervie=
wBuilder.cpp</a><br>

                  <br>
                  Best of luck,<br>
                  Dave
                  <div>
                    <div><br>
                      <br>
                      <br>
                      On 11/28/12 11:45 AM, Jorge Martin wrote:<br>
                    </div>
                  </div>
                </div>
                <blockquote type=3D"cite">
                  <div>
                    <div>Hello,
                      <div><br>
                      </div>
                      <div><br>
                      </div>
                      <div>=A0 =A0 I am trying to write <span style=3D"back=
ground-color:yellow"><span>multi</span></span>-file

                        TIFF. In some cases I am obtaining the following
                        error from <span>TIFFWriteDirectory</span>
                        function:=A0</div>
                      <div><br>
                      </div>
                      <div><span>TIFFLinkDirectory</span>: Error
                        fetching directory count.<br>
                      </div>
                      <div><br>
                      </div>
                      <div>=A0 =A0 =A0<span>TIFFReadDirectory</span> help
                        says:</div>
                      <div><br>
                      </div>
                      <div>=A0 =A0 =A0 &quot;<b>Error fetching directory co=
unt</b><span>.
                          A read error occurred when fetching the
                          directory count field for a previous
                          directory. This can occur when setting up a
                          link to the directory that is being written.&quot=
;</span></div>
                      <div><br>
                      </div>
                      <div>=A0 =A0 But I do not understand=A0the origin of =
the
                        error and how to solve this problem, because it
                        only writes the first image.=A0</div>
                      <div><br>
                      </div>
                      <div>=A0 =A0 Does anyone know how to solve this error=
?</div>
                      <div> <br>
                      </div>
                      <div>Best Regards,</div>
                      <div><br>
                      </div>
                      <div>Jorge</div>
                      <br>
                      <fieldset></fieldset>
                      <br>
                    </div>
                  </div>
                  <pre>_______________________________________________
Tiff mailing list: <a href=3D"mailto:Tiff@lists.maptools.org" target=3D"_bl=
ank">Tiff@lists.maptools.org</a>
<a href=3D"http://lists.maptools.org/mailman/listinfo/tiff" target=3D"_blan=
k">http://lists.maptools.org/mailman/listinfo/tiff</a>
<a href=3D"http://www.remotesensing.org/libtiff/" target=3D"_blank">http://=
www.remotesensing.org/libtiff/</a></pre>
                </blockquote>
                <br>
              </div>
            </blockquote>
          </div>
          <br>
        </div>
      </div>
    </blockquote>
    <br>
  </div></div></div>

</blockquote></div><br></div></div>

--bcaec554dbd8954c4f04cf9f7dcd--

--===============0957637549==
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/
--===============0957637549==--
