Skip to content

IResourceAnimationReader

interface IResourceAnimationReader
Known subtypes: ApngResourceAnimationReader, GifResourceAnimationReader, WebpResourceAnimationReader
Package: dev.joid.lib.resource.animation · Module: core · Source: IResourceAnimationReader.java

Reads every frame of an animated image file into a ResourceAnimation.

Give it to AnimatedResourceDecoder.create from the IResourceFormat of your format. Compose the frames on a ResourceAnimationCanvas when the format stores them as partial updates.

ReturnsSignatureSummary
ResourceAnimationread(InputStream stream) abstractJOID calls it on a loading thread, once per file: read the whole stream and return its frames, each a full image of the animation size.

ResourceAnimation read(InputStream stream) abstract

JOID calls it on a loading thread, once per file: read the whole stream and return its frames, each a full image of the animation size. Throw IOException or IllegalArgumentException when the file is damaged; the resource then fails.


fluent returns the instance, typed for chaining · factory creates an instance · signal also accepts a value that follows signals, as a signal, an expression or a lambda (When does JOID compute this value again?) · hook called by JOID, override it · abstract you implement it · default interface method with a body · static called on the class · protected visible to subclasses

Report a problem with this page