Expand description
Sniffs containers for animation.
A picture names its own format in its first bytes and carries its frame
sequence, if it has one, at a place each format fixes. Reading those is what
lets a request for a still be honored against a file whose declared content
type says otherwise, or says nothing useful, as image/png does for an
APNG.
A walk answers one of three states, because the two questions asked of it take opposite defaults. Whether a picture may be served fails closed, so an unreadable one is withheld and a wrong answer costs a needless re-encode rather than a violation; what a picture is names nothing the walk did not settle, since a guess there would be written down as fact.
EnumsΒ§
- Sequence π
- What a containerβs header settles about a frame sequence.
ConstantsΒ§
- GIF_
COLOR_ πTABLE - GIF_
EXTENSION π - GIF_
HEADER_ πLEN - Bytes the signature and the logical screen descriptor occupy together.
- GIF_
IMAGE π - GIF_
MAGIC π - GIF_
TABLE_ πSIZE - GIF_
TRAILER π - PNG_
ANIMATION π - PNG_
DATA π - PNG_
MAGIC π - RIFF_
MAGIC π - WEBP_
ANIMATION π - WEBP_
EXTENDED π - WEBP_
LOSSLESS π - WEBP_
LOSSY π - WEBP_
MAGIC π
FunctionsΒ§
- animated_
type π - The container type a pictureβs own bytes name.
- animates π
- Whether these bytes may carry more than one frame.
- color_
table_ πlen - Size in bytes of the colour table a descriptor announces.
- gif_
sequence π - Whether a GIF holds more than one image descriptor.
- image_
data_ πstart - Offset of an image descriptorβs sub-block chain.
- png_
sequence π - Whether a PNG holds the control chunk that makes it an APNG.
- sequence π
- Walks the container its first bytes name.
- skip_
sub_ πblocks - Offset past the sub-block chain starting here, when it ends.
- webp_
sequence π - Whether a WebP announces animation in its opening chunk.