Skip to content

ApngResourceAnimationReader

class ApngResourceAnimationReader
Implements: IResourceAnimationReader
Package: dev.joid.lib.resource.animation.impl · Module: core · Source: ApngResourceAnimationReader.java

Reads the frames of an animated PNG (APNG).

ReturnsSignatureSummary
ApngResourceAnimationReader()Creates the reader.

ReturnsSignatureSummary
ResourceAnimationread(InputStream stream)Reads every frame of the APNG, composed with its blend and disposal, and the play count of the file.
BooleanisAnimated(byte[] bytes) staticReturns true when bytes show an animation control chunk before the image data, false when they show the image data first or are not a PNG, and null when they end before either.

ApngResourceAnimationReader()

Creates the reader.

ResourceAnimation read(InputStream stream)

Throws:

  • IllegalArgumentException: The PNG has no IHDR chunk before its image data, the file is damaged: export it again
  • IllegalArgumentException: The PNG has no acTL chunk or no frame control, it is not an animated PNG: draw it as a still image or export it as an APNG

Reads every frame of the APNG, composed with its blend and disposal, and the play count of the file.

Boolean isAnimated(byte[] bytes) static

Returns true when bytes show an animation control chunk before the image data, false when they show the image data first or are not a PNG, and null when they end before either.


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