AWARE [SYSTEMS]
AWare Systems, , Home TIFF and LibTiff Mailing List Archive

LibTiff Mailing List

TIFF and LibTiff Mailing List Archive
December 2018

Previous Thread
Next Thread

Previous by Thread
Next by Thread

Previous by Date
Next by Date

Contact

The TIFF Mailing List Homepage
Archive maintained by AWare Systems



New Datamatrix section



Valid HTML 4.01!



Thread

2018.12.12 22:21 "Fwd: TIFFSetDirectory and TIFFCurrentDirectory issues in libtif 4.0.10", by Bardas Georgios
2018.12.12 22:57 "Re: Fwd: TIFFSetDirectory and TIFFCurrentDirectory issues in libtif 4.0.10", by Kemp Watson
2018.12.13 15:00 "Re: Fwd: TIFFSetDirectory and TIFFCurrentDirectory issues in libtif 4.0.10", by Olivier Paquet

2018.12.13 15:00 "Re: Fwd: TIFFSetDirectory and TIFFCurrentDirectory issues in libtif 4.0.10", by Olivier Paquet

Le mer. 12 déc. 2018 à 17:21, Bardas Georgios <geobar2010@gmail.com> a
écrit :
>
> Hello gentlemen,
> I have been working in Libtiff for one or two weeks now, and i am stuck
> into some mysterious problem. I am using libtiff 4.0.10 in Visual Studio
> 2017 and just trying to do the following task: I am willing to fill the
> first page (directory) with some data (black tiles (256x256) for example)
> and then i need to read that information and write it on the next page
> decimated by two. In fact all i am trying to make is a tiled pyramid tiff
> image which the level 0 is so big i can parse it only through tiles. My
> question is: Is it possible to write one directory and then return back
> and read from it to write that data on the next directory?
>

There might be better ways but I know you can do it by opening the
file a second time. After you've called TIFFWriteDirectory, use
TIFFOpen() to get a second TIFF handle to read back your data and keep
using your first handle to write the next image. One small caveat:
windows needs (or at least used to need, I haven't checked in ages) a
FlushFileBuffers() call after TIFFWriteDirectory() for this to work
over SMB. I think you will also need to disable memory mapping
(TIFFOpen() with "m").

Olivier
_______________________________________________
Tiff mailing list
Tiff@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/tiff