Handbook
Glossary
tga-image
Vocabulary
images
.
tga
Definition
IN:
images.tga
SINGLETON:
tga-image
Methods
USING:
accessors
combinators
endian
images
images.loader
images.tga
io
kernel
math
sequences
;
M:
tga-image
image>stream
2drop
[
component-order>>
{
BGRA
BGRA
}
member?
[
bad-tga-unsupported
]
unless
]
keep
B{
0
}
write
B{
0
}
write
B{
2
}
write
B{
0 0 0 0 0
}
write
B{
0 0 0 0
}
write
{
[
dim>>
first
2
>le
write
]
[
dim>>
second
2
>le
write
]
[
component-order>>
{
{
BGR
[
~byte-array~
write
]
}
{
BGRA
[
~byte-array~
write
]
}
}
case
]
[
dup
component-order>>
{
{
BGR
[
0
]
}
{
BGRA
[
8
]
}
}
case
swap
upside-down?>>
[
0
]
[
2
]
if
3
shift
bitor
1
>le
write
]
[
bitmap>>
write
]
}
cleave
;
USING:
images.loader
images.tga
io
io.streams.throwing
kernel
;
M:
tga-image
stream>image*
drop
[
[
read-tga
]
throw-on-eof
]
with-input-stream
;