AWARE [SYSTEMS] Imaging expertise for the Delphi developer
AWare Systems, Imaging expertise for the Delphi developer, Home TIFF and LibTiff Mailing List Archive

LibTiff Mailing List

TIFF and LibTiff Mailing List Archive
November 1999

Previous Thread
Next Thread

Previous by Thread
Next by Thread

Previous by Date
Next by Date


The TIFF Mailing List Homepage
This list is run by Frank Warmerdam
Archive maintained by AWare Systems

Valid HTML 4.01!


1999.11.15 13:59 "multiple tiff files", by Peter Zitzelsperger
1999.11.18 09:07 "Re: multiple tiff files", by Bruno Ledoux
1999.11.19 10:16 "Re: multiple tiff files", by Peter Zitzelsperger

1999.11.19 10:16 "Re: multiple tiff files", by Peter Zitzelsperger


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.