AWARE [SYSTEMS] Imaging expertise for the Delphi developer
AWare Systems, Imaging expertise for the Delphi developer, Home TIFF and LibTiff Mailing List Archive

LibTiff Mailing List

TIFF and LibTiff Mailing List Archive
March 2007

Previous Thread
Next Thread

Previous by Thread
Next by Thread

Previous by Date
Next by Date

Contact

The TIFF Mailing List Homepage
This list is run by Frank Warmerdam
Archive maintained by AWare Systems



Valid HTML 4.01!



Thread

2007.03.23 17:38 "Re: Tiff Digest, Vol 34, Issue 16", by George Nianios
2007.03.24 10:18 "Re: Tiff Digest, Vol 34, Issue 16", by Andrey Kiselev

2007.03.24 10:18 "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++)
> {
> TIFFSetDirectory(tif,i);
> read_tiff(tif,width,height,i);
> }
> _TIFFfree(raster);
> TIFFClose(tif);
> 
> 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 {
>             dircount++;
>         } 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

-- 
Andrey V. Kiselev
ICQ# 26871517