each-pixel ( ... image quot: ( ... x y pixel -- ... ) -- ... )


Vocabulary
images

Inputs
imagean object
quota quotation with stack effect ( ... x y pixel -- ... )


Outputs
None

Definition


:: each-pixel
( ... image quot: ( ... x y pixel -- ... ) -- ... )
image dim>> first2 :> ( width height ) image bytes-per-pixel
:> n height width [ <iota> ] bi@ [| y x |
y width * x + :> start start n * :> from from n +
:> to x y from to image bitmap>> <slice> quot call
] cartesian-each ; inline