[GH-ISSUE #129] Add support to APNG #1482

Closed
opened 2026-03-01 18:45:51 +03:00 by kerem · 9 comments
Owner

Originally created by @mlocati on GitHub (Apr 28, 2017).
Original GitHub issue: https://github.com/NickeManarin/ScreenToGif/issues/129

APNG is finally going to land on Chrome too (reference).

What about adding support to it, in addition to .gif?

PS: here's a sample APNG image

Originally created by @mlocati on GitHub (Apr 28, 2017). Original GitHub issue: https://github.com/NickeManarin/ScreenToGif/issues/129 APNG is finally going to land on Chrome too ([reference](https://caniuse.com/#search=apng)). What about adding support to it, in addition to .gif? PS: [here's a sample APNG image](https://upload.wikimedia.org/wikipedia/commons/1/14/Animated_PNG_example_bouncing_beach_ball.png)
kerem 2026-03-01 18:45:51 +03:00
Author
Owner

@panther2 commented on GitHub (Apr 28, 2017):

+1 for this request.

See this demo to compare the size of output files.

<!-- gh-comment-id:298084054 --> @panther2 commented on GitHub (Apr 28, 2017): +1 for this request. See [this demo](http://littlesvr.ca/apng/gif_apng_webp3.html) to compare the size of output files.
Author
Owner

@vatterspun commented on GitHub (Apr 30, 2017):

Workarounds:

  1. Compose a GIF file in ScreenToGif and then compress using PNGOptimizer (http://psydk.org/pngoptimizer)
  2. Record something and then save as project to a temporary folder. Open the .STG file it creates with 7zip and compile them in an animated PNG using a compile program like APNG Anime Maker (https://sites.google.com/site/cphktool/apng-anime-maker).
<!-- gh-comment-id:298261577 --> @vatterspun commented on GitHub (Apr 30, 2017): Workarounds: 1. Compose a GIF file in ScreenToGif and then compress using PNGOptimizer (http://psydk.org/pngoptimizer) 2. Record something and then save as project to a temporary folder. Open the .STG file it creates with 7zip and compile them in an animated PNG using a compile program like APNG Anime Maker (https://sites.google.com/site/cphktool/apng-anime-maker).
Author
Owner

@mlocati commented on GitHub (May 1, 2017):

Since this wonderful app seems to work with frames in PNG format, I think it could be quite easy to integrate http://apngasm.sourceforge.net into ScreenToGif

<!-- gh-comment-id:298331020 --> @mlocati commented on GitHub (May 1, 2017): Since this wonderful app seems to work with frames in PNG format, I think it could be quite easy to integrate http://apngasm.sourceforge.net into ScreenToGif
Author
Owner

@vatterspun commented on GitHub (May 4, 2017):

Oh and I forgot to mention: one reason to use animated PNG is quality: GIFs are limited to 256 colors while PNG supports 24-bit color. You can see a very clear example of this in software slideshow:

https://imgur.com/gallery/N4MzwAd - Animated PNG
https://imgur.com/gallery/eeSoS - Animated GIF (look at the very grainy cancel button)

( Why this happens: "When converting an image from the PNG format to GIF, the image quality may suffer due to posterization if the PNG image has more than 256 colors." https://en.wikipedia.org/wiki/Portable_Network_Graphics#Graphics_Interchange_Format_.28GIF.29 )

<!-- gh-comment-id:299335324 --> @vatterspun commented on GitHub (May 4, 2017): Oh and I forgot to mention: one reason to use animated PNG is quality: GIFs are limited to 256 colors while PNG supports 24-bit color. You can see a very clear example of this in software slideshow: https://imgur.com/gallery/N4MzwAd - Animated PNG https://imgur.com/gallery/eeSoS - Animated GIF (look at the very grainy cancel button) ( Why this happens: "When converting an image from the PNG format to GIF, the image quality may suffer due to posterization if the PNG image has more than 256 colors." https://en.wikipedia.org/wiki/Portable_Network_Graphics#Graphics_Interchange_Format_.28GIF.29 )
Author
Owner

@NickeManarin commented on GitHub (Nov 23, 2017):

Done!

Should be available with the next release, v2.11

<!-- gh-comment-id:346704286 --> @NickeManarin commented on GitHub (Nov 23, 2017): Done! Should be available with the next release, v2.11
Author
Owner

@vatterspun commented on GitHub (Nov 24, 2017):

Ah fantastic news, thanks for that.

<!-- gh-comment-id:346883655 --> @vatterspun commented on GitHub (Nov 24, 2017): Ah fantastic news, thanks for that.
Author
Owner

@vatterspun commented on GitHub (Dec 25, 2017):

So by way of reference, some notes about Animated PNG and Animated GIF ...

All of the following are the same recording made by clicking on a few buttons on the screentogif.com homepage, one saved to GIF and the other PNG. The 3rd and 4th images were run through a second program PNGOptimizer (http://psydk.org/pngoptimizer ... also an open source program), which converts GIF files to PNG (both animated and static) and further compresses PNG files.


File 1 (66 k): GIF file. You'll notice that it doesn't have the same color depth as GIF files are restricted to 256 colors.

1

File 2 (91 k): PNG file. Not smaller than the GIF file because it has a much wider color range.

2

File 3 (80 k): File 2 with PNGOptimizer. About 10% smaller than before.

3

File 4 (46 k): File 1 saved using PNGOptimizer, which converts the animated GIF (File 1) to animated PNG . The conversion results in a file that's about 30% smaller and almost half the size of the compressed PNG (File 3).

4

Results: This was about what I was expecting and shows some of the strengths and limitations of the APNG vs. GIF format.

<!-- gh-comment-id:353829082 --> @vatterspun commented on GitHub (Dec 25, 2017): So by way of reference, some notes about Animated PNG and Animated GIF ... All of the following are the same recording made by clicking on a few buttons on the _screentogif.com_ homepage, one saved to GIF and the other PNG. The 3rd and 4th images were run through a second program PNGOptimizer (http://psydk.org/pngoptimizer ... also an open source program), which converts GIF files to PNG (both animated and static) and further compresses PNG files. ---- **File 1** (66 k): GIF file. You'll notice that it doesn't have the same color depth as GIF files are restricted to 256 colors. ![1](https://user-images.githubusercontent.com/1289134/34332788-85e2008e-e8fa-11e7-959a-29ca3ef7e1bb.gif) **File 2** (91 k): PNG file. Not smaller than the GIF file because it has a much wider color range. ![2](https://user-images.githubusercontent.com/1289134/34332792-8a76f41a-e8fa-11e7-98e8-29e167188527.png) **File 3** (80 k): File 2 with PNGOptimizer. About 10% smaller than before. ![3](https://user-images.githubusercontent.com/1289134/34332793-8e55a07c-e8fa-11e7-9973-335fb8195126.png) **File 4** (46 k): File 1 saved using PNGOptimizer, which converts the animated GIF (File 1) to animated PNG . The conversion results in a file that's about 30% smaller and almost half the size of the compressed PNG (File 3). ![4](https://user-images.githubusercontent.com/1289134/34332799-91d45df6-e8fa-11e7-9fe3-d9e8127d9eee.png) **Results**: This was about what I was expecting and shows some of the strengths and limitations of the APNG vs. GIF format.
Author
Owner

@vatterspun commented on GitHub (Dec 25, 2017):

Oh and one final note, Github doesn't currently accept files that end with .APNG.

<!-- gh-comment-id:353830698 --> @vatterspun commented on GitHub (Dec 25, 2017): Oh and one final note, Github doesn't currently accept files that end with .APNG.
Author
Owner

@NickeManarin commented on GitHub (Jan 13, 2018):

@vatterspun Indeed, instead you can select to export as *.png.

<!-- gh-comment-id:357459564 --> @NickeManarin commented on GitHub (Jan 13, 2018): @vatterspun Indeed, instead you can select to export as *.png.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/ScreenToGif#1482
No description provided.