Handbook
Glossary
pgm-image
Vocabulary
images
.
pgm
Definition
IN:
images.pgm
SINGLETON:
pgm-image
Methods
USING:
accessors
combinators
images
images.loader
images.pgm
io
io.encodings.ascii
io.encodings.string
kernel
math.parser
sequences
;
M:
pgm-image
image>stream
2drop
{
[
drop
"P5\n"
ascii
encode
write
]
[
dim>>
first
number>string
" "
append
ascii
encode
write
]
[
dim>>
second
number>string
"\n"
append
ascii
encode
write
]
[
component-type>>
ubyte-components
=
[
"255\n"
]
[
"65535\n"
]
if
ascii
encode
write
]
[
bitmap>>
write
]
}
cleave
;
USING:
images.loader
images.pgm
io
io.streams.throwing
kernel
;
M:
pgm-image
stream>image*
drop
[
[
read-pgm
]
throw-on-eof
]
with-input-stream
;