Class TiffReader

  • public class TiffReader
    extends Object
    Processes TIFF-formatted data, calling into client code via that TiffHandler interface.
    • Constructor Detail

      • TiffReader

        public TiffReader()
    • Method Detail

      • processIfd

        public static void processIfd​(TiffHandler handler,
                                      RandomAccessReader reader,
                                      Set<Integer> processedIfdOffsets,
                                      int ifdOffset,
                                      int tiffHeaderOffset)
                               throws IOException
        Processes a TIFF IFD. IFD Header:
        • 2 bytes number of tags
        Tag structure:
        • 2 bytes tag type
        • 2 bytes format code (values 1 to 12, inclusive)
        • 4 bytes component count
        • 4 bytes inline value, or offset pointer if too large to fit in four bytes
        handler - the TiffHandler that will coordinate processing and accept read values
        reader - the RandomAccessReader from which the data should be read
        processedIfdOffsets - the set of visited IFD offsets, to avoid revisiting the same IFD in an endless loop
        ifdOffset - the offset within reader at which the IFD data starts
        tiffHeaderOffset - the offset within reader at which the TIFF header starts
        IOException - an error occurred while accessing the required data