     height [
         8 bs bs:read
         count [ depth bs bs:read ] replicate swap prefix
+        8 bs bs:align
     ] replicate
     #components bit-depth 16 = [ 2 * ] when reverse-png-filter ;
 

    } cleave ;

: find-compressed-bytes ( loading-png -- bytes )
    chunks>> [ type>> "IDAT" = ] filter
    [ data>> ] map concat ;

ERROR: unknown-color-type n ;
ERROR: unimplemented-color-type image ;

            validate-truecolor raw-bytes RGB
        ] }
        { indexed-color [
            validate-indexed-color decode-indexed-color RGB
        ] }
        { greyscale-alpha [
            validate-greyscale-alpha decode-greyscale-alpha LA
