| AWARE [SYSTEMS] | Imaging expertise for the Delphi developer | |||||||
![]() |
TIFF and LibTiff Mailing List Archive | |||||||
LibTiff Mailing List
TIFF and LibTiff Mailing List Archive Contact
The TIFF Mailing List Homepage |
Thread2007.03.24 10:18 "Re: Tiff Digest, Vol 34, Issue 16", by Andrey KiselevOn 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
|
|||||||