2007.03.23 10:16 "[Tiff] Multipage tiff", by George Nianios

2007.03.24 10:18 "Re: [Tiff] Re: Tiff Digest, Vol 34, Issue 16", by Andrey Kiselev

On Fri, Mar 23, 2007 at 07:38:59PM +0200, George Nianios wrote:

int i;
for (i=0;i<dircount-1;i++)

With this code i put in frame[] color info from each single tiff page from one multipage tiff.

But gcc returns me for image the same warning:

TIFFReadDirectory: Warning, multitest.tif: invalid TIFF directory; tags are not sorted in ascending order.

multitest.tif: Warning, incorrect count for field "DateTime" (44, expecting 20); tag trimmed.

I know that this warning becomes from this routine:

if (tif) {
         do {
         } while (TIFFReadDirectory(tif));
         printf("%d directories in %s\n", dircount, argv[1]);

and i know that my multipage tiff is not the proper but i am wondering if i could pass these warnings. I have this routine only because i want to count the sum of the pages of the multipage tiff. Do you know another way to do it?

There is no other way to count pages. That may be changed in the future libtiff versions, but for now the only way is to read pages one-by-one. To suppress warnings you can use your custom TIFFErrorHandler function. Just assign a dummy procedure as a handler, and all errors and warnings will go through that function.

Best regards,


Andrey V. Kiselev
ICQ# 26871517