fast-png icon indicating copy to clipboard operation
fast-png copied to clipboard

Add support for APNG

Open lpatiny opened this issue 2 years ago • 2 comments

Add the support for animated PNG.

decodeToBeDefined that returns systematically an array of images.

lpatiny avatar Dec 15 '23 17:12 lpatiny

Do we want to decode or generate APNG (or both)?

opatiny avatar Dec 22 '23 09:12 opatiny

Decode.

targos avatar Dec 22 '23 10:12 targos

It seems like all is needed is to add an additional chunk to mark that an image is in fact APNG, then it just stacks chunks with data in a sequence. So it can be decoded as an array of frames. Probably current data decoding function will work on APNG data frames as well.

Image

EscapedGibbon avatar Apr 29 '25 16:04 EscapedGibbon

Sounds simple enough! It looks like we can create a separate APNG decoder, that will internally call the PNG decoder with each frame. I would would be the decodeAPNG function return an object, so we can have top-level metadata and the array of frames.

targos avatar May 01 '25 06:05 targos