 
 SINGLETON: tiff-image
 
-TUPLE: parsed-tiff endianness the-answer ifd-offset ifds ;
-CONSTRUCTOR: parsed-tiff ( -- tiff ) V{ } clone >>ifds ;
+TUPLE: loading-tiff endianness the-answer ifd-offset ifds ;
+CONSTRUCTOR: loading-tiff ( -- tiff ) V{ } clone >>ifds ;
 
 TUPLE: ifd count ifd-entries next
 processed-tags strips bitmap ;

        [ nip unhandled-ifd-entry swap ]
    } case ;

: process-ifds ( parsed-tiff -- parsed-tiff )
    [
        [
            dup ifd-entries>>

        drop "no planar configuration" throw
    ] if ;

: process-tif-ifds ( loading-tiff -- )
    ifds>> [ process-ifd ] each ;

: load-tiff ( path -- loading-tiff )
    [ load-tiff-ifds dup ] keep
    binary [
        [ process-tif-ifds ] with-tiff-endianness
