| 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 |
Thread2006.10.26 18:34 "Re: TIFFReadPrivateDirectory function is not working for SUBIFD", by Sebastian BoehmerHello,
Yes that's right.
The __TIFFReadCustomDirectoryPart function reads only the tags with are
"registered" in parameter TIFFFieldInfo** info[]. The parameter size_t*
nfields is the size of this array.
You have to register the filed with TIFFMergeFieldInfo ...
Anyway is it although a question if we should read the tags which are
not registered like in TIFFReadDirectory.
I think we should. I will correct this next week. So long use the
TIFFMergeField function , please.
--
greets
> Hello All
>
> I am trying to read subIFD with the help of
> TIFFReadPrivateDirectory(TIFF* tif, toff_t diroff) , but finally got
> that it's not working.
>
> this is the code snippet of the function
>
> __TIFFReadCustomDirectoryPart(TIFF* tif, toff_t diroff, size_t*
> nfields, TIFFFieldInfo** info[], int attrPrivateDirectory ) {
>
> fix = 0;
>
> for (dp = dir, i = dircount; i > 0; i--, dp++) {
>
> if (tif->tif_flags & TIFF_SWAB) {
>
> TIFFSwabArrayOfShort(&dp->tdir_tag, 2);
>
> TIFFSwabArrayOfLong(&dp->tdir_count, 2);
>
> }
>
> if (fix >= *nfields || dp->tdir_tag == IGNORE)
>
> continue;
>
> // none of the line executed below it
>
> while (fix < *nfields && (*info)[fix]->field_tag < dp->tdir_tag)
>
> fix++;
>
> }
>
> }
>
> above nfields is tif->tif_nPrivateFields, which is always 0 at the
> time of SubIFD reading. So the loop never complete , it's always
> return from the same line.
>
> Please let me know how to read SubIFD with the help of the above
> fucntions.
>
> Thanks In Advance
>
> Anurag
>
>
>
>
>
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> Tiff mailing list: Tiff@lists.maptools.org
> http://lists.maptools.org/mailman/listinfo/tiff
> http://www.remotesensing.org/libtiff/
|
|||||||