Handbook
Glossary
read-png-chunks ( loading-png -- loading-png )
Vocabulary
images
.
png
Inputs
loading-png
an
object
Outputs
loading-png
an
object
Definition
USING:
accessors
checksums
checksums.crc32
endian
io
io.encodings.ascii
io.encodings.string
kernel
math
sequences
;
IN:
images.png
:
read-png-chunks
( loading-png -- loading-png )
<png-chunk>
4
read
be>
4
+
read
dup
crc32
checksum-bytes
4
read
=
[
bad-checksum
]
unless
4
cut-slice
[
ascii
decode
>>type
]
[
B{
}
like
>>data
]
bi*
[
over
chunks>>
push
]
[
type>>
]
bi
"IEND"
=
[
read-png-chunks
]
unless
;