Received: from [209.42.233.245] by phillip.cerious.com (NTMail 3.03.0017/7.aaxh) with ESMTP id pcrews for <pcrews@cerious.com>; Fri, 19 Nov 1999 08:03:13 -0500
Received: from gate7.olympiakos.com (207.176.88.85) by mail2.catalogue.com with
 ESMTP (Eudora Internet Mail Server 2.2.2); Fri, 19 Nov 1999 08:50:35 -0400
Received: from localhost (daemon@localhost)
	by gate7.olympiakos.com (8.9.3/8.9.3) with SMTP id JAA31696;
	Fri, 19 Nov 1999 09:30:38 -0500
Received: by gate7.olympiakos.com (bulk_mailer v1.9); Fri, 19 Nov 1999 09:21:25 -0500
Received: (from majordom@localhost)
	by gate7.olympiakos.com (8.9.3/8.9.3) id JAA31518
	for tiff-outgoing; Fri, 19 Nov 1999 09:21:24 -0500
X-Authentication-Warning: gate7.olympiakos.com: majordom set sender to owner-tiff@olympiakos.com using -f
Received: from netgate.wenninger.de (root@[195.238.230.237])
	by gate7.olympiakos.com (8.9.3/8.9.3) with ESMTP id JAA31515
	for <tiff@olympiakos.com>; Fri, 19 Nov 1999 09:21:14 -0500
Received: from wenninger.de (p-zitzelsperger.wenninger.de [192.168.1.138])
	by netgate.wenninger.de (8.9.3/8.9.3) with ESMTP id KAA23488;
	Fri, 19 Nov 1999 10:04:24 +0100
Message-ID: <38352382.EA8D0E5D@wenninger.de>
Date: Fri, 19 Nov 1999 10:16:34 +0000
From: Peter Zitzelsperger <zitzelsp@geoware.de>
X-Mailer: Mozilla 4.05 [en] (WinNT; I)
MIME-Version: 1.0
To: Ledoux <bruno_ledoux@binuscan.com>
CC: Peter Zitzelsperger <zitzelsp@geoware.de>,
        "tiff@olympiakos.com" <tiff@olympiakos.com>
Subject: Re: multiple tiff files
References: <383011DD.949B0365@wenninger.de> <3833C1E6.9E3B1783@binuscan.com>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Sender: owner-tiff@olympiakos.com

Hi!

First of all, thanks to your comment.

Ledoux wrote:

> If your purpose is to save multiple images in the same tiff file , the
> exact term is multipage tiff, I can assure that the libtiff supports it
> without any problem , provided that you ONLY use the libtif functions to
> read or write tiles.
>

Yes, I want to create a multipage tiff, and I use *ONLY* libtiff functions.

> >
> >         // open tiff file with TIFFOpen(...)
> >
>
> Do you open file in mapped "w" mode or unmapped "wu" mode ? Just a question
> normally it shouldn't affect the file.

Open parameter is ''w''

> >
> >         // over all images
> >         for( i4_image_count=0;
> > i4_image_count<m_pt_image->GetNumImages(); i4_image_count++ )
> >         {
> >             TIFFSetDirectory( tiff_file, i4_image_count );
> >
> >             // set some basic tifftags like imagelength, imagewidth,
> > samplesperpixel, bitspersample,...
>
> >             // write the data in tiles
> >             m_pt_image->WriteBuffer2Tiles( tiff_file,
> >                                 m_pt_image->GetImageLength(
> > i4_image_count ),
> >                                 m_pt_image->GetImageWidth(
> > i4_image_count ),
> >                                 i4_image_count );
>
> What is your WriteBuffer2Tiles method doing ? does it call TIFFWriteTiles
> or any other IO function to write to the file?

WriteBuffer2Tiles does nothing but calculate tiles from strips and writing the
tiles with TIFFWriteTile() from the libtiff. I had long debug sessions to find
that a _TIFFmalloc() in TIFFwritebufferSetup() does not what it is supposed to.
Funny enough, the application does everything correctly when I step through
with the debugger, but it returns an error and exits, when I run it in one
step. So, in theory, its impossible, to find the mistake. Well, I don't know
how, but I'll continue to search...

> >
> >             TIFFWriteDirectory( tiff_file );
> >         }
> >
> > This should guarantee, that every image entry has its own specific info
> > and data.The trouble I run into is, that
> >     -this loop works well for two images, after that, _TIFFalloc fails
> > to get storage
> >     -this loop works well for, say nine images, but the file created
> > file has only two entrys, the second
> >      of which has strange values for the tags(samples per pixel,...)
>
> Don't hesitate to contact me if you have any other problem.

Well, here I am. Thanks in advance...

Peter Zitzelsperger.


