AWare Systems, , Home TIFF and LibTiff Mailing List Archive

LibTiff Mailing List

TIFF and LibTiff Mailing List Archive
January 2016

Previous Thread
Next Thread

Previous by Thread
Next by Thread

Previous by Date
Next by Date


The TIFF Mailing List Homepage
Archive maintained by AWare Systems

New Datamatrix section

Valid HTML 4.01!


2016.01.11 11:19 "Problem with TIFFCurrentDirectory", by John Stevenson-hoare
2016.01.11 14:18 "Re: Problem with TIFFCurrentDirectory", by Olivier Paquet

2016.01.11 11:19 "Problem with TIFFCurrentDirectory", by John Stevenson-hoare

I am using libtiff version 4.0.6 on Windows 7.

The man pages state that directories are indexed from 0, but when I create a
new TIFF and invoke TIFFCurrentDirectory the return value is 65535. Is this
a bug?

A simple example is:

TIFF *tif = TIFFOpen("new.tif", "w8");
tdir_t dir = TIFFCurrentDirectory(tif);

My problem is that I need to cache the indexes of directories as I create
them so that I can re-visit and update them. If I do this with a file
containing 2 directories (both tiled images) the library reports:

'TIFFWriteRawTile: Can not write tiles to a stripped image.'

when I use TIFFSetDirectory(tif, 65535) in an attempt to set the first
directory. If I create say 3 directories and 'artificially' assume that
indexing starts from 0, then when I set the directory to 0 the library

'new.tif: JPEG compression support is not configured.' when I invoke
TIFFWriteRawTile() with a previously compressed JPEG tile.

But the additional tiles are written correctly to the first image.

Oddly, if I create only 2 directories and artificially assume index 0, then
I get the error:

'TIFFWriteRawTile: Tile M out of range, max N.' for each tile to be written
and the additional tiles are, not unsurprisingly, added to the image.

Any help would be appreciated.

[FFEI_Logo_BoxOnly[1].png]<> [FFEI wins 3rd Queens
award for innovation]

This message and any attachment is confidential and is protected by
copyright. If you are not the intended recipient, please email the sender
and delete this message and any attachment from your system.

Dissemination and or copying of this email is prohibited if you are not the
intended recipient. We believe, but do not warrant, that this email and any
attachments are virus free. You should take full responsibility for virus

No responsibility is accepted by FFEI Ltd for personal emails or emails
unconnected with FFEI Limited's business.

FFEI Limited is a limited company registered in England and Wales
(Registered Number: 3244452).

[Join us on Linked In]<> [Follow
@FFEI_ltd] <>  [FFEI YouTube Channel]
Registered Office: The Cube, Maylands Avenue, Hemel Hempstead,
Hertfordshire, HP2 7DF, England.
Tiff mailing list: