Handbook
Glossary
load-bitmap ( stream -- loading-bitmap )
Vocabulary
images
.
bitmap
Inputs
stream
an
object
Outputs
loading-bitmap
an
object
Definition
USING:
accessors
combinators
io
io.streams.throwing
kernel
;
IN:
images.bitmap
:
load-bitmap
( stream -- loading-bitmap )
[
[
\
loading-bitmap
new
parse-file-header
[
>>file-header
]
[
]
bi
magic>>
{
{
"BM"
[
dup
file-header>>
header-length>>
parse-header
>>header
parse-color-palette
parse-color-data
]
}
[
unsupported-bitmap-file
]
}
case
]
throw-on-eof
]
with-input-stream
;