Handbook
Glossary
each-pixel ( ... image quot: ( ... x y pixel -- ... ) -- ... )
Vocabulary
images
Inputs
image
an
object
quot
a
quotation
with stack effect
( ... x y pixel -- ... )
Outputs
None
Definition
USING:
accessors
kernel
math
sequences
;
IN:
images
::
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