Return-Path: <awaresystems.be+caf_=filtered=awaresystems.be@gmail.com>
Delivered-To: filtered@awaresystems.be
Received: from mx-r.one.com (mx-r.one.com [91.198.169.249])
	by mail6.local (Postfix) with ESMTP id 7478880103FB2
	for <filtered@awaresystems.be>; Wed, 28 Nov 2012 23:09:38 +0100 (CET)
X-Virus-Scanned: by one.com
X-Amavis-Alert: BAD HEADER SECTION, Duplicate header field: "MIME-Version"
Received-SPF: pass (mx-r: domain of awaresystems.be+caf_=filtered=awaresystems.be@gmail.com designates 209.85.220.176 as permitted sender)
X-Greylist: whitelisted by SQLgrey-1.8.0-rc2
Received: from mail-vc0-f176.google.com (mail-vc0-f176.google.com [209.85.220.176])
	by mx-r.one.com (Postfix) with ESMTP id 9ECC5D1EF4F
	for <filtered@awaresystems.be>; Wed, 28 Nov 2012 22:09:37 +0000 (UTC)
Received: by mail-vc0-f176.google.com with SMTP id fl13so19294344vcb.21
        for <filtered@awaresystems.be>; Wed, 28 Nov 2012 14:09:36 -0800 (PST)
Received: by 10.58.248.41 with SMTP id yj9mr30768190vec.29.1354140576661;
        Wed, 28 Nov 2012 14:09:36 -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.58.144.166 with SMTP id sn6csp761230veb;
        Wed, 28 Nov 2012 14:09:35 -0800 (PST)
Received: by 10.220.229.133 with SMTP id ji5mr29422602vcb.51.1354140574314;
        Wed, 28 Nov 2012 14:09:34 -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.230.163.205 with POP3 id b13mf7768607vby.16;
        Wed, 28 Nov 2012 14:09:33 -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 EF83A80103FB2
	for <info@awaresystems.be>; Wed, 28 Nov 2012 22:58:20 +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 74E26CD6BD8
	for <info@awaresystems.be>; Wed, 28 Nov 2012 21:58:20 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
	by lists.maptools.org (Postfix) with ESMTP id C16EE43A053;
	Wed, 28 Nov 2012 16:57:00 -0500 (EST)
Received: from qmta10.emeryville.ca.mail.comcast.net
	(qmta10.emeryville.ca.mail.comcast.net [76.96.30.17])
	by lists.maptools.org (Postfix) with ESMTP id 1C8A243A053
	for <tiff@lists.maptools.org>; Wed, 28 Nov 2012 16:37:30 -0500 (EST)
Received: from omta12.emeryville.ca.mail.comcast.net ([76.96.30.44])
	by qmta10.emeryville.ca.mail.comcast.net with comcast
	id V8Dr1k0040x6nqcAA9db7x; Wed, 28 Nov 2012 21:37:35 +0000
Received: from [192.168.1.22] ([173.12.67.206])
	by omta12.emeryville.ca.mail.comcast.net with comcast
	id V9dZ1k00C4T0qAt8Y9dZUH; Wed, 28 Nov 2012 21:37:34 +0000
Message-ID: <50B6841C.1060802@comcast.net>
Date: Wed, 28 Nov 2012 16:37:32 -0500
From: David Burken <dburken@comcast.net>
User-Agent: Mozilla/5.0 (X11; Linux x86_64;
	rv:17.0) Gecko/17.0 Thunderbird/17.0
MIME-Version: 1.0
To: Jorge Martin <jormarfe@gmail.com>
References: <CADH5xWrpZzSL3GWgD77i1eN2YqD+aAzDmQ7DY9_0YaE7kaJcNw@mail.gmail.com>
	<50B66055.7010001@comcast.net>
	<CADH5xWpvqp-c3VPPLCARw_Coi2eokSQjC9=AWqFnp+pSETm5ag@mail.gmail.com>
In-Reply-To: <CADH5xWpvqp-c3VPPLCARw_Coi2eokSQjC9=AWqFnp+pSETm5ag@mail.gmail.com>
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="===============0497444734=="
Mime-version: 1.0
Sender: tiff-bounces@lists.maptools.org
Errors-To: tiff-bounces@lists.maptools.org

This is a multi-part message in MIME format.
--===============0497444734==
Content-Type: multipart/alternative;
 boundary="------------060002030100020307050908"

This is a multi-part message in MIME format.
--------------060002030100020307050908
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit

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 <mailto: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.org  <mailto:Tiff@lists.maptools.org>
>>     http://lists.maptools.org/mailman/listinfo/tiff
>>     http://www.remotesensing.org/libtiff/
>
>


--------------060002030100020307050908
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit

<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#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<br>
    <br>
    <br>
    <br>
    <div class="moz-cite-prefix">On 11/28/2012 03:19 PM, Jorge Martin
      wrote:<br>
    </div>
    <blockquote
cite="mid:CADH5xWpvqp-c3VPPLCARw_Coi2eokSQjC9=AWqFnp+pSETm5ag@mail.gmail.com"
      type="cite">Hello,
      <div><br>
      </div>
      <div>&nbsp; &nbsp; &nbsp; &nbsp; Thank you very much for your help!!!</div>
      <div><br>
      </div>
      <div>&nbsp; &nbsp; &nbsp; &nbsp; I have discovered that the problem is only appearing
        in a code that is linked to <span class="" style="">libtiff</span>
        and also to <span class="" style="">libgdal</span>. In the
        other cases the executable is not linked to <span class=""
          style="">gdal</span> library.&nbsp;</div>
      <div><br>
      </div>
      <div>&nbsp; &nbsp; &nbsp; &nbsp; I have removed <span class="" style="">gdal</span>
        library in the code that reproduces the problem and it
        disappears, the <span class="" style="">multi</span>-file is
        written correctly.&nbsp;</div>
      <div><br>
      </div>
      <div>&nbsp; &nbsp; &nbsp; &nbsp; I think that it could also disappears if I change the
        order of linking <span class="" style="">libtiff</span> and <span
          class="" style="">libgdal</span> libraries 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="gmail_extra"><br>
          <br>
          <div class="gmail_quote">2012/11/28 David <span class=""
              style="">Burken</span> <span dir="ltr">&lt;<a
                moz-do-not-send="true" href="mailto:dburken@comcast.net"
                target="_blank"><span class="" style="">dburken</span>@<span
                  class="" style="">comcast</span>.net</a>&gt;</span><br>
            <blockquote class="gmail_quote" style="margin:0 0 0
              .8ex;border-left:1px #ccc solid;padding-left:1ex">
              <div bgcolor="#FFFFFF" text="#000000">
                <div>Hi,<br>
                  <br>
                  You may need&nbsp; a TIFFFlush call.&nbsp; This class writes
                  subfiles (overviews) if you want to look at it.<br>
                  <br>
                  <a moz-do-not-send="true"
href="http://trac.osgeo.org/ossim/browser/trunk/ossim/src/ossim/imaging/ossimTiffOverviewBuilder.cpp"
                    target="_blank">http://trac.osgeo.org/ossim/browser/trunk/ossim/src/ossim/imaging/ossimTiffOverviewBuilder.cpp</a><br>
                  <br>
                  Best of luck,<br>
                  Dave
                  <div>
                    <div class="h5"><br>
                      <br>
                      <br>
                      On 11/28/12 11:45 AM, Jorge Martin wrote:<br>
                    </div>
                  </div>
                </div>
                <blockquote type="cite">
                  <div>
                    <div class="h5">Hello,
                      <div><br>
                      </div>
                      <div><br>
                      </div>
                      <div>&nbsp; &nbsp; I am trying to write <span
                          style="background-color:yellow"><span>multi</span></span>-file

                        TIFF. In some cases I am obtaining the following
                        error from <span>TIFFWriteDirectory</span>
                        function:&nbsp;</div>
                      <div><br>
                      </div>
                      <div><span>TIFFLinkDirectory</span>: Error
                        fetching directory count.<br>
                      </div>
                      <div><br>
                      </div>
                      <div>&nbsp; &nbsp; &nbsp;<span>TIFFReadDirectory</span> help
                        says:</div>
                      <div><br>
                      </div>
                      <div>&nbsp; &nbsp; &nbsp; "<b>Error fetching directory count</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."</span></div>
                      <div><br>
                      </div>
                      <div>&nbsp; &nbsp; But I do not understand&nbsp;the origin of the
                        error and how to solve this problem, because it
                        only writes the first image.&nbsp;</div>
                      <div><br>
                      </div>
                      <div>&nbsp; &nbsp; 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 moz-do-not-send="true" href="mailto:Tiff@lists.maptools.org" target="_blank">Tiff@lists.maptools.org</a>
<a moz-do-not-send="true" href="http://lists.maptools.org/mailman/listinfo/tiff" target="_blank">http://lists.maptools.org/mailman/listinfo/tiff</a>
<a moz-do-not-send="true" href="http://www.remotesensing.org/libtiff/" target="_blank">http://www.remotesensing.org/libtiff/</a></pre>
                </blockquote>
                <br>
              </div>
            </blockquote>
          </div>
          <br>
        </div>
      </div>
    </blockquote>
    <br>
  </body>
</html>

--------------060002030100020307050908--

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