Sharex: [Feature request] Animated PNG functionality

Created on 29 Jun 2017  路  8Comments  路  Source: ShareX/ShareX

Why Animated PNG?

No one can deny the ongoing popularity of GIF, but the format is roughly 30 years old this year and there has been an updated version for some time now. Like standard PNG images, the APNG format enjoys better color support and (in my testing) anywhere from 10-50% space savings. The topic hasn't come up much because it was missing support from some of the major players, notably Google Chrome. However, as of June 5th, the list of viewers is looking fairly complete: https://en.wikipedia.org/wiki/APNG .

Why ShareX?

The list of GIF creators is long, but there are very few APNG creators unless you're talking about simple converters (like the excellent PNG Optimizer). ShareX would be a great addition to that list.

Reasons not to support APNG

It's not yet ubiquitous and GIF is still more than adequate. Older graphics viewers and Internet Explorer for example still don't support it. Existing FFMPEG video recording tools inside ShareX are more efficient when recording very colorful images.

Enhancement

Most helpful comment

Lossy source is not ideal for such testing. It's like converting JPEG to PNG.
If you try clean PNG sequence with apngasm converter - the results are much better.
Converting GIF to APNG with gif2apng is also likely to produce APNG that's smaller than original GIF.
It landed in Stable Chrome 59 recently, so not everyone's updated yet.
Demo page with apng samples: https://people-mozilla.org/~dolske/apng/demo.html

All 8 comments

Wikipedia is banned in my country so I can't see list of viewers.

Most browsers support APNG now, except for IE/Edge.

Imgur supports it, and many other image hosting sites too.

XnView and IrfanView supports it.

I tried converting 147 kb video to apng and result become 3.6mb.
FFmpeg not doing optimizations to ignore duplicate frames etc. which causing very high size and not suitable for ShareX. So I can't add it like this.
Also when I tried to open that .apng link in my Chrome browser, it was downloading it instead of showing preview. Stable Chrome not supports apng?

Lossy source is not ideal for such testing. It's like converting JPEG to PNG.
If you try clean PNG sequence with apngasm converter - the results are much better.
Converting GIF to APNG with gif2apng is also likely to produce APNG that's smaller than original GIF.
It landed in Stable Chrome 59 recently, so not everyone's updated yet.
Demo page with apng samples: https://people-mozilla.org/~dolske/apng/demo.html

Lossy source is not ideal for such testing. It's like converting JPEG to PNG.

Exactly right. Here are some example screens from a GIF file created using some PNG screenshots + APNG Anime Maker and run through PNG Optimizer (size = 36k, full spectrum color):

a

Same sequence compiled using PhotoScape (size = 56k, lower quality):

b3

Those apps you telling handling duplicate frames and doing probably diff checks to only draw changed parts which decreasing file size greatly. Until FFmpeg also do these, it will be pointless to add.

Those apps you telling handling duplicate frames and doing probably diff checks to only draw changed parts which decreasing file size greatly.

True: there are some great GIF file compression tools that allow for similar areas to be utilized from frame to frame, similar to modern video codecs. However, one of the reasons GIF is still so common (and maybe bigger than ever) is that you can add, add, disassemble, and otherwise build upon existing GIFs. Meanwhile, edits to even old MPEG-2 videos start to look terrible as you can tell by all the poor quality Youtube re-posts out there.

APNG has all the advantages of GIF and only one negative: doesn't work on old devices (or Internet Explorer).

Until FFmpeg also do these, it will be pointless to add.

I get that you want to add real and accepted formats so I certainly understand. There is an APNG converter inside FFmpeg, but I'm not clear how advanced it is. I might make sense to wait until the tool has matured a bit more.

Workaround for converting ShareX-created GIF files to APNG: PNGOptimizer: http://psydk.org/pngoptimizer It's dead-simple, drag and drop converter, also open source and works on any number of files.


Related thread: #3084

Was this page helpful?
0 / 5 - 0 ratings

Related issues

thelastfantasy picture thelastfantasy  路  3Comments

skygate2012 picture skygate2012  路  3Comments

Stele77 picture Stele77  路  3Comments

olsonnn picture olsonnn  路  3Comments

notesplaymyheart picture notesplaymyheart  路  3Comments