         [ nip unhandled-ifd-entry swap ]
     } case ;
 
-: process-ifds ( parsed-tiff -- parsed-tiff )
+: process-ifds ( loading-tiff -- loading-tiff )
     [
         [
             dup ifd-entries>>

: tiff>image ( image -- image )
    ifds>> [ ifd>image ] map first ;

: with-tiff-endianness ( parsed-tiff quot -- )
    [ dup endianness>> ] dip with-endianness ; inline

: load-tiff-ifds ( path -- parsed-tiff )
    binary [
        <parsed-tiff>
        read-header [
            dup ifd-offset>> read-ifds
            process-ifds

        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
