This content has been marked as final. Show 4 replies
Did you download the source code DNG SDK? If so, what does the dng_validate tool report in
"-v" mode report for your DNG file? If not, why not?
> The first image also contains tag 330, which gives information about the subIFDs. The value of directory entry "count" is 2, which means that there are 2 child images. The value of the IFD entry is 572, which is apparently the offset to the first child image
Basics: if the value(s) does not/do not fit in the four bytes of the tag, then the value in the tag is *always* an offset *to those values*.
In this case there are two values, each being an offset, i.e. four bytes long. Accordingly, the value 572 is the offset *to two four-byte values*, which in this case happen to be offsets on their own, to the two sub IFDs.
> Here is a first ambiguity in the TIFF documentation TIFF6_Specification_Sup1.pdf): It is not explicitely stated that the value is the offset of the next SubIFD
These two sub IFDs are not *chained* together, because both are "pointed at" directly from the first IFD.
> Reading the number of tags of the SubIFD at offset 572, I get the incredible high number of 18006 tags
Of course, because at 572 there are two offsets to the two sub IFDs, not the sub IFDs themselves.
Btw, the reason for two sub IFDs here is that you requested the DNG converter to create a preview image, beside the thumbnail. If you specify "none", then the tag 330 contains the offset directly to the (only) sub IFD of the very first IFD.
Thank you, Thomas, for your answer, which was very helpful. The mistake I made was that I did not understand that all IFD addresses are stored at the place specified by tag 330. Before I thought that all the address of the next child IFD is always found at the end of the previous child IFD. After this misunderstanding was resolved, I can read now the IFDs without problem.
Still it will take me some time to understand also, how the image body of the high resolution image is read out.
I did not use DNG SDK, because I didn't know about it. I tried to learn from the TIFF and DNG documentations.
The purpose of all this effort are applications to astrophotography.
Another question. From the DNG documentation I inferred that DNG uses the lossless Huffman JPEG compression. Did I get this right?