gifski icon indicating copy to clipboard operation
gifski copied to clipboard

Feature Request: APNG Output

Open jasikpark opened this issue 3 years ago • 1 comments

Discord recently came out with "Stickers", of which the only options for animated images is APNG's... would it be possible to have gifski also support apng's? (or point me in the direction of a good guide for producing optimized apng's 🙏)

This is an amazing project, thank y'all for you work, btw!

One of the requirements that is fun is a 500kb limit on the APNG, so I've been using https://github.com/shgodoroja/APNGb and imageoptim in lossy mode and https://ezgif.com/gif-to-apng since I wasn't able to find any fully desktop solution.

jasikpark avatar Jul 03 '21 05:07 jasikpark

Unfortunately, APNG is a worse format than GIF. It has two modes: palette and true-color. The palette one has only a single palette for the entire animation, which gives it fewer colors than GIF with a palette per frame. The true-color one uses 3-4 times more data per pixel, so it creates larger files.

For APNG you will need a good palette. If you make a filmstrip with all the frames and process it with pngquant, it should give you a good one. But since APNG format is so bad, and basically a dead-end in a wrong turn of evolution of video formats, I'm not planning to support it.

kornelski avatar Jul 03 '21 10:07 kornelski

apngasm does animated png https://github.com/apngasm/apngasm

clort81 avatar Dec 21 '23 11:12 clort81

Well, APNG might be worse a bit in one use case (doesn't support separate palettes per frame), but it's much better in another use case (supports alpha channel).

vrubleg avatar Dec 23 '23 06:12 vrubleg