             validate-greyscale decode-greyscale L
         ] }
         { truecolor [
-            validate-truecolor raw-bytes RGB
+            validate-truecolor uncompress-bytes RGB
         ] }
         { indexed-color [
             validate-indexed-color decode-indexed-color RGB

    } case ;

: decode-greyscale ( loading-png -- byte-array )
    [ raw-bytes ] keep scale-greyscale ;

: decode-greyscale-alpha ( loading-image -- byte-array )
    [ raw-bytes ] [ bit-depth>> ] bi 16 = [
        4 group [ first4 [ swap ] 2dip 4array ] map B{ } concat-as
    ] when ;


        png-unfilter-line
    ] map B{ } concat-as ;

:: visit ( row col height width pixel image -- )
    row image nth :> irow
    pixel col irow set-nth ;

ERROR: bad-filter n ;

:: reverse-interlace-none ( byte-array loading-png -- array )
    byte-array bs:<msb0-bit-reader> :> bs
    loading-png width>> :> width
    loading-png height>> :> height
    loading-png png-components-per-pixel :> #components
