(image source: https://apng.onevcat.com/demo/)
APNG is a format that extends PNG with support for animations, similar to animated gifs.
This class, which is implemented in B4X, extracts the frames from the APNG file and creates the animation.
It doesn't support all possible formats. If you encounter a file that is not supported then post it
Under the hood it uses RandomAccessFile + BytesBuilder + BitmapCreator + native CRC32 implementation to extract the frames, build temporary images that are loaded as regular bitmaps and then animate them.
Tip: You can use this tool to create APNG images: http://apngasm.sourceforge.net/
- V1.10 - Adds support for images with inter-frame optimizations: http://littlesvr.ca/apng/inter-frame.html
It depends on B4XCollections v1.12+: https://www.b4x.com/android/forum/threads/b4x-b4xcollections-more-collections.101071/#content