AWARE SYSTEMS
TIFF and LibTiff Mail List Archive

Thread

2005.03.04 22:36 "[Tiff] Advice on replacing use of tiffiop.h internals with public APIs", by Jon Leech
2005.04.06 12:19 "[Tiff] PB with TIFFWriteScanline, writing after data", by samuel
2005.04.06 12:53 "Re: [Tiff] PB with TIFFWriteScanline, writing after data", by Joris

2005.04.06 12:19 "[Tiff] PB with TIFFWriteScanline, writing after data", by samuel

Hi!

I've made a function called createEmptyFile(TIFF* file, uint32 width, uint32 height) wich create an empty file opened with TIFFOpen(".","r").

This function set different TAGS like:

           TIFFTAG_IMAGEWIDTH

          TIFFTAG_IMAGELENGTH

      TIFFTAG_SAMPLESPERPIXEL

        TIFFTAG_BITSPERSAMPLE

         TIFFTAG_PLANARCONFIG

          TIFFTAG_PHOTOMETRIC

         TIFFTAG_ROWSPERSTRIP

Then with a FOR loop, it fills the raster data with 0xFF and thanks to the TIFFWriteScanline function.

This work perfectly!

But then when a want to alter one row by calling TIFFWriteScanline again, raster data are written after the existing raster data and before the ending directory (the different tags). So it doesn't overwrite the row I want to!

Is it normal?

Thank you very much if you can help me!

And sorry my English is not so good..

sam