Detecting Invalid Image Length in Tiff Tag

I found out that tiff documents may have the wrong TIFL ImageLength tag. Most viewers discover this and show the image in the correct length, but I want to do it programmatically. Is there a library that can help me? (In any language)

+3
source share
1 answer

The short answer to this question is that in order to find the “real” ImageLength, you have to decode the image and see what happens.

In theory, you can multiply the RowsPerStrip tag and multiply this by the number of lines that will have a length that the image cannot exceed, but if the last line is less than the line on the line, you need to decode the last line to know exactly. For tiles, you can do something similar.

This, of course, applies only if the image is stripped or laid out.

Otherwise, to find out you have to decode.

+2
source

All Articles