Skip to content

Investigation: animation / sub-images #1894

@fintelia

Description

@fintelia

Various image formats have ways of representing multiple images within a single file, either as frames of an animation, different sizes of the same image, and/or multiple distinct images. Currently, we only exposes the AnimationDecoder that lets you turn an image decoder into a sequence of Rgba8 frames, but doesn't have any other functionality for working with files containing multiple sub-images. Given the prevalence of this capability, it may make sense to make it part of the core ImageDecoder trait.

Format Meaning of sub-images
PNG animation
JPEG n/a
GIF animation
BMP n/a
ICO multiple sizes of the same image
TIFF multiple distinct images or multiple sizes of the same image
WebP animation
AVIF animation
PNM n/a
DDS multiple images layers with the same format and dimensions
TGA n/a
OpenEXR multiple distinct images each potentially with multiple sizes
farbfeld n/a

(Please let me know if you notice any mistakes in the table. I'm not super familiar with most of these formats.)

Metadata

Metadata

Assignees

No one assigned

    Labels

    kind: APImissing or awkward public APIs, maintainer choice

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions