Return-Path: <awaresystems.be+caf_=filtered=awaresystems.be@gmail.com>
Delivered-To: filtered@awaresystems.be
Received: from mx-v.one.com (mx-v.one.com [195.47.247.147])
	by mail6.local (Postfix) with ESMTP id 9A06330022D3B5
	for <filtered@awaresystems.be>; Tue, 17 Jun 2014 13:38:41 +0000 (UTC)
X-Virus-Scanned: by one.com
Received-SPF: pass (mx-v: domain of awaresystems.be+caf_=filtered=awaresystems.be@gmail.com designates 209.85.215.45 as permitted sender)
X-Greylist: whitelisted by SQLgrey-1.8.0-rc2
Received: from mail-la0-f45.google.com (mail-la0-f45.google.com [209.85.215.45])
	by mx-v.one.com (Postfix) with ESMTP id 54B9C12C8CDC
	for <filtered@awaresystems.be>; Tue, 17 Jun 2014 13:38:41 +0000 (UTC)
Received: by mail-la0-f45.google.com with SMTP id hr17so1561122lab.4
        for <filtered@awaresystems.be>; Tue, 17 Jun 2014 06:38:41 -0700 (PDT)
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=1e100.net; s=20130820;
        h=x-original-authentication-results:delivered-to:delivered-to:date
         :from:to:in-reply-to:message-id:references:user-agent:mime-version
         :content-type:cc:subject:precedence:list-id:list-unsubscribe
         :list-archive:list-post:list-help:list-subscribe:sender:errors-to;
        bh=h4h+Cf00L3n8ZB/yTqpnD981Q4ANob6FeiGUmOwG1zs=;
        b=eSRk5C/YyJhEt/hw2oyGeyUwcdLE4EGglBJhIdJtV1EUBGFfm+kUUYpYiGV+lKpehm
         fB4n3uSa3LjlrMG2g/+xTdua/VuXaB5yi0C7Jk1fPvHNjXLELh2CNgpydctAYD75pjVB
         VB/zIfJsAabMv49B/Rt0Mo5eZpApKDgXoP+qvnRSBDMTmcZQdwOpnG3Ip9fomUuUTpwF
         0/fZEYsZuToItjoiKLDMHI/G9U/sCiI1fChZPuIuh7WClO3XXyne7XNTa8Bfx2y1g5G2
         5i7qHGBogX70bQ/PevhM8FE9Pj34UKtIo7GDxpsADcd+YnihM8noh5OmglUum6VIIY/k
         0oFQ==
X-Original-Authentication-Results: mx.google.com;       spf=neutral (google.com: tiff-bounces@lists.maptools.org does not designate permitted sender hosts) smtp.mail=tiff-bounces@lists.maptools.org
X-Received: by 10.112.63.194 with SMTP id i2mr17382512lbs.10.1403012321006;
        Tue, 17 Jun 2014 06:38:41 -0700 (PDT)
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.114.18.137 with SMTP id w9csp59844ldd;
        Tue, 17 Jun 2014 06:38:40 -0700 (PDT)
X-Received: by 10.152.19.229 with SMTP id i5mr1735726lae.60.1403012318832;
        Tue, 17 Jun 2014 06:38:38 -0700 (PDT)
Authentication-Results: mx.google.com;
       spf=neutral (google.com: tiff-bounces@lists.maptools.org does not designate permitted sender hosts) smtp.mail=tiff-bounces@lists.maptools.org
Received-SPF: none (google.com: tiff-bounces@lists.maptools.org does not designate permitted sender hosts) client-ip=91.198.169.250;
Received: by 10.112.0.202 with POP3 id 10mf1682285lbg.7;
        Tue, 17 Jun 2014 06:38:38 -0700 (PDT)
X-Gmail-Fetch-Info: info@awaresystems.be 1 pop.awaresystems.be 110 info@awaresystems.be
Delivered-To: info@awaresystems.be
Received: from mx-s.one.com (mx-s.one.com [91.198.169.250])
	by mail6.local (Postfix) with ESMTP id 859F03002336B2
	for <info@awaresystems.be>; Tue, 17 Jun 2014 13:26:40 +0000 (UTC)
X-Greylist: domain auto-whitelisted by SQLgrey-1.8.0-rc2
Received: from lists.maptools.org (ks365428.kimsufi.com [94.23.4.142])
	by mx-s.one.com (Postfix) with ESMTP id 58F4E450D45
	for <info@awaresystems.be>; Tue, 17 Jun 2014 13:26:40 +0000 (UTC)
Received: from [10.1.0.241] (localhost.localdomain [127.0.0.1])
	by lists.maptools.org (Postfix) with ESMTP id F230635C024;
	Tue, 17 Jun 2014 08:25:57 -0500 (EST)
Received: from blade.simplesystems.org (blade.simplesystems.org [65.66.246.74])
	by lists.maptools.org (Postfix) with ESMTPS id 15C9135C024
	for <tiff@lists.maptools.org>; Tue, 17 Jun 2014 08:25:33 -0500 (EST)
Received: from freddy.simplesystems.org (freddy.simplesystems.org
	[65.66.246.65])
	by blade.simplesystems.org (8.14.4+Sun/8.14.4) with ESMTP id
	s5HDPRAW021734; Tue, 17 Jun 2014 08:25:27 -0500 (CDT)
Date: Tue, 17 Jun 2014 08:25:27 -0500 (CDT)
From: Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
X-X-Sender: bfriesen@freddy.simplesystems.org
To: =?ISO-8859-15?Q?=22Benedikt_F=FChrer=22?= <Banshee999@gmx.de>
In-Reply-To: <trinity-402562ba-f539-4e48-8b23-f04357aa30b7-1402998363797@3capp-gmx-bs38>
Message-ID: <alpine.GSO.2.01.1406170816080.18732@freddy.simplesystems.org>
References: <trinity-402562ba-f539-4e48-8b23-f04357aa30b7-1402998363797@3capp-gmx-bs38>
User-Agent: Alpine 2.01 (GSO 1266 2009-07-14)
MIME-Version: 1.0
Content-Type: MULTIPART/MIXED;
	BOUNDARY="-559023410-481930146-1403011527=:18732"
X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.2.2
	(blade.simplesystems.org [65.66.246.90]);
	Tue, 17 Jun 2014 08:25:27 -0500 (CDT)
Cc: tiff@lists.maptools.org
Subject: Re: [Tiff] In-memory tiffs
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>
Sender: tiff-bounces@lists.maptools.org
Errors-To: tiff-bounces@lists.maptools.org

  This message is in MIME format.  The first part should be readable text,
  while the remaining parts are likely unreadable without MIME-aware tools.

---559023410-481930146-1403011527=:18732
Content-Type: TEXT/PLAIN; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8BIT

On Tue, 17 Jun 2014, "Benedikt Führer" wrote:

> Hey,
>  
> I have to questions regarding in-memory tiffs:
>  
> 1) I'm using the helper functions TIFFStreamOpen to try to write multi-directory tiffs into an ostringstream in binary mode.
> It works perfectly fine for the first directory but as soon as I call TIFFWriteDirectory the 2nd time, it will fail with the
> error message "Couldn't fetch directory count". What am I doing wrong here? I suspected that the library tries to read

It seems likely that the stream is failing to seek correctly.  See 
_tiffisSeekProc() in libtiff/tif_stream.cxx.  It may be that your 
ostringstream does not support necessary behavior or it may be that 
the libtiff C++ wrapper has bugs.

What version of libtiff are you using?

With libtiff 4.X there could be an interfacing weakness if C++'s I/O 
only supports signed 32-bit offsets but libtiff 4.X supports unsigned 
64-bit offsets.

As far as I am aware, there is not currently a test case for the C++ 
wrapper so it could be broken and we would not know about it.  It 
would be good if someone would contribute a C++-based test case for 
the libtiff 'test' subdirectory.

> 2) Because of this problem I tried to debug the tiff source from within my VStudio project. I'm linking libtiff statically, so
> it's added in the linker input field and the include directory is known to the compiler. However it won't allow me to step
> into the source files even if I enter the libtiff directory as a directory to look for debug sources (and I'm sure the sources

These problems are likely due to inconsistent options between building 
libtiff and your project.  Visual Studio projects and 'nmake' work 
fundamentally differently since 'nmake' does not inherently support 
multiple builds ('Debug', 'Release') at once.

The manifest issues are beyond me.  Either study Microsoft 
documentation for at least a day in order to understand how to use 
manifests or take the easier way out by assuring that all DLLs are in 
the same directory as the using program.

Bob
-- 
Bob Friesenhahn
bfriesen@simple.dallas.tx.us, http://www.simplesystems.org/users/bfriesen/
GraphicsMagick Maintainer,    http://www.GraphicsMagick.org/
---559023410-481930146-1403011527=:18732
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/
---559023410-481930146-1403011527=:18732--
