 : interlaced? ( image -- ? ) flags>> 6 bit? ; inline
 : sort? ( image -- ? ) flags>> 5 bit? ; inline
 : color-table-size ( image -- ? ) flags>> 3 bits 1 + 2^ 3 * ; inline
+: transparency? ( image -- ? )
+    graphic-control-extensions>> first flags>> 0 bit? ; inline
 
 : color-resolution ( image -- ? ) flags>> -4 shift 3 bits ; inline
 

ERROR: gif-unexpected-eof ;

TUPLE: graphics-control-extension
label block-size raw-data
packed delay-time color-index
block-terminator ;

TUPLE: image-descriptor
left top width height flags first-code-size ;


: read-graphic-control-extension ( -- graphic-control-extension )
    \ graphics-control-extension new
        1 read le> graphic-control-extension-block-size assert=
        1 read le> >>flags
        2 read le> >>delay-time
        1 read le> >>transparent-color-index
        1 read le> block-terminator assert= ;

: read-plain-text-extension ( -- plain-text-extension )
    \ plain-text-extension new
