Handbook
Glossary
bitmap>bytes ( loading-bitmap -- byte-array )
Vocabulary
images
.
bitmap
Inputs
loading-bitmap
an
object
Outputs
byte-array
an
object
Definition
USING:
accessors
bitstreams
byte-arrays
combinators
endian
grouping
kernel
sequences
;
IN:
images.bitmap
:
bitmap>bytes
( loading-bitmap -- byte-array )
dup
header>>
bit-count>>
{
{
32
[
color-index>>
]
}
{
24
[
color-index>>
]
}
{
16
[
[
2
group
[
le>
]
map
{
31744 992 31
}
uncompress-bitfield
]
change-color-index
color-index>>
]
}
{
8
[
color-lookup
]
}
{
4
[
[
4
byte-array-n>sequence
]
change-color-index
color-lookup
]
}
{
1
[
[
1
byte-array-n>sequence
]
change-color-index
color-lookup
]
}
[
bmp-not-supported
]
}
case
>byte-array
;