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).
Learn more
Section titled “Learn more”Creation
Section titled “Creation”| Returns | Signature | Summary |
|---|---|---|
| ApngResourceAnimationReader() | Creates the reader. |
Methods
Section titled “Methods”| Returns | Signature | Summary |
|---|---|---|
ResourceAnimation | read(InputStream stream) | 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. |
Creation details
Section titled “Creation details”ApngResourceAnimationReader
Section titled “ApngResourceAnimationReader”ApngResourceAnimationReader()
Creates the reader.
Method details
Section titled “Method details”ResourceAnimation read(InputStream stream)
Throws:
IllegalArgumentException: The PNG has no IHDR chunk before its image data, the file is damaged: export it againIllegalArgumentException: 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.
isAnimated
Section titled “isAnimated”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
