Grayscale image: Difference between revisions

Content deleted Content added
Line 229: Line 229:
: gfill ( c gmp -- )
: gfill ( c gmp -- )
dup bdata swap bdim * rot fill ;
dup bdata swap bdim * rot fill ;
: gshow ( gmp -- )
dup bdim
0 do cr
dup 0 do
over i j rot g@ if [char] * emit else space then
loop
loop
2drop ;


\ RGB <-> Grayscale
\ RGB <-> Grayscale