AWARE SYSTEMS
TIFF and LibTiff Mail List Archive

Thread

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.18 09:07 "Re: multiple tiff files", by Bruno Ledoux

Hi,

I've been developing on some TIFF stuff on WIN NT with the libtiff*, I can create images, draw some stuff and save them properly. Now I find the need to create multiple TIFF images, and nothing works any more. So, what's the basic idea about multiple tiffs? My suggestion is:

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.

// 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.

// 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?

Don't hesitate to contact me if you have any other problem.

bruno
BINUSCAN