Skip to content

dalecurtis/apng-assemble

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

apng-assemble

Simple demo assembling APNGs from an HTML5 canvas.

Demo

Since APNG is a simple extension of PNG, we can assemble animated images using individual PNGs encoded by canvas.toBlob() and offscreenCanvas.convertToBlob().

A PNG contains a couple metadata chunks and then image data as one or more IDAT chunks. APNG just adds a few new chunks: acTL, fcTL and fdAT. The last of which is just an IDAT with a sequence number added.

This demo works by slicing the image data out of each image and applying a minor transform to change it into the format expected by APNG. Wikipedia has an excellent diagram of what this transform looks like.

About

JavaScript APNG assembler

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published