The APNG format

Share interesting information or links related to portable apps here.
Message
Author
User avatar
webfork
Posts: 10818
Joined: Wed Apr 11, 2007 8:06 pm
Location: US, Texas
Contact:

The APNG format

#1 Post by webfork »

This thread is moved from a GIF animation program: LICEcap

Background
  • So I did some digging for an animated GIF alternative. The only thing I came up with that didn't involve a Javascript tool that probably wouldn't work here on the forums was APNG format, only supported by some browsers (Opera, Mozilla, and Chrome w/ a plugin).

    So I looked into this a bit more to see if this was worthwhile.
Solution
  • For GIF to APNG, there's a great converter GIF2APNG that works great. Its open source, looks portable (no settings saved), and works beautifully on LICEcap files. One of the animations created with LICEcap deflated to 60% of its original size. The original animation Baas posted on the LICEcap page reduced by 50%. In addition, the files further compressed with ZIP compression brought the size down even more. [Running ZIP or 7-zip on the GIF file made no real difference.]

    Note that the program's results depended on the file type: it only decreases file size of simple GIF animations on the home site by about 15%. I was only able to save about 5% on an animated series of pictures I took.
Compatibility
  • APNG support with some PFW programs:
    • Yes: XnView 1.98.5, VirtualDub with mod, Opera - yes, but had some problems with more complex ones generated by LiceCAP

      No: LibreOffice 3.44, IrfanView 4.27, FastStone Image Viewer 4.2, QTWeb, Maxthon

      No and doesn't work with animated GIF files either: Universal Viewer 5.3.0 - (GIF files will view, but had some problems with more complex ones generated by LiceCAP), VLC, SMPLayer, ComicsViewer
Further work
  • As a direct conversion from animated GIF to APNG doesn't take advantage of PNG's powerful compression abilities, I went looking for a better method: I tried to split up the GIF files, optimize them with a batch operation in RIOT, and then reassemble.

    I used IrfanView (Options - Extract all Frames), which is great, but there's an incompatibility with LICEcap: you can't use any of the program's extras (timer, mouse button press animation, added words, etc.) as the images show up in different sizes. Right now I'm working with a program to assemble all the frames back together again as an APNG file rather than going through GIF and then the converter. Might be able to bring the size down to something miniscule.

    I also tried just converting a GIF to video using VirtualDub, which worked in VLC. I think I might have been able to bring the size down with a better compression algorithm.
Related articles on the topic
Related tools:
NOTE: A few more tests with some LICEcap files converted to APNG with its extras like text and mouse click animation unfortunately had some issues (conversion looks very odd). Looking into that.

User avatar
m^(2)
Posts: 890
Joined: Sat Mar 31, 2007 2:38 am
Location: Kce,PL
Contact:

Re: The APNG format

#2 Post by m^(2) »

Interesting summary, thank you.

User avatar
webfork
Posts: 10818
Joined: Wed Apr 11, 2007 8:06 pm
Location: US, Texas
Contact:

Re: The APNG format

#3 Post by webfork »

Update: I tested gif2apng with GIFs created using PhotoScape's animation tool and it works beautifully. Consistently getting 50% of the size with no visible difference from the original. Excellent results especially when you have MANY frames of a HOWTO or slideshow.

Example:

User avatar
webfork
Posts: 10818
Joined: Wed Apr 11, 2007 8:06 pm
Location: US, Texas
Contact:

Re: The APNG format

#4 Post by webfork »

NOTE: A few more tests with some LICEcap files converted to APNG with its extras like text and mouse click animation unfortunately had some issues (conversion looks very odd). Looking into that.
Thread update: user procyon solved this problem.

User avatar
Userfriendly
Posts: 430
Joined: Tue Nov 27, 2012 11:41 pm

Re: The APNG format

#5 Post by Userfriendly »

Some other stuff to create and edit animated PNG's:
APNG Anime maker - http://www.portablefreeware.com/index.php?id=2367
RealWorld Paint - http://www.portablefreeware.com/index.php?id=2166
Java APNG - https://www.reto-hoehener.ch/japng/
Paint.NET plugin - http://forums.getpaint.net/index.php?/t ... agif-apng/
Firefox addon - https://addons.mozilla.org/en-us/firefox/addon/animat/

Also recently, while reporting a gif display bug for the image viewer Imagine, I requested support for creating animated png's. The animation editor can read and convert apng's to other formats like gif and animated cursors but can't create apng itself. Hopefully future versions will have that feature.

User avatar
webfork
Posts: 10818
Joined: Wed Apr 11, 2007 8:06 pm
Location: US, Texas
Contact:

Re: The APNG format

#6 Post by webfork »

Userfriendly wrote:Some other stuff to create and edit animated PNG's:
Great news. Hopefully the wide toolset to generate animated files that are dramatically superior to GIF will expand it's adoption.

User avatar
webfork
Posts: 10818
Joined: Wed Apr 11, 2007 8:06 pm
Location: US, Texas
Contact:

Re: The APNG format

#7 Post by webfork »

Userfriendly wrote:RealWorld Paint - http://www.portablefreeware.com/index.php?id=2166
One of the things that's prevented me from working with the APNG format (or really any animation format) is lack of an effective editor. I hadn't worked with Real World Paint much but finally started working with it a bit more and found it to be an outstanding animation editor (for both GIF and PNG).

Lots of tools and tweaks including reordering, copy/paste, edition, and batch changes for color, size, animation speed, etc. PhotoScape has only reording, resizing, and only the GIF format. This is a great find.

Edit: want to link to the other thread that discusses this

User avatar
webfork
Posts: 10818
Joined: Wed Apr 11, 2007 8:06 pm
Location: US, Texas
Contact:

Re: The APNG format

#8 Post by webfork »

Saw a kickstarter project out for this, but I'm a little blurry on what this is going to actually accomplish. Still, they at least seem to be trying to get APNG to browsers that don't support it, which is great news. Already the largest images on our site would cut down dramatically if we could switch them over to the vastly improved format.

User avatar
SYSTEM
Posts: 2041
Joined: Sat Jul 31, 2010 1:19 am
Location: Helsinki, Finland

Re: The APNG format

#9 Post by SYSTEM »

webfork wrote: Saw a kickstarter project out for this, but I'm a little blurry on what this is going to actually accomplish.
Apparently that project tries to create new tools to create APNG files.
My YouTube channel | Release date of my 13th playlist: August 24, 2020

User avatar
guinness
Posts: 4118
Joined: Mon Aug 27, 2007 2:00 am
Contact:

Re: The APNG format

#10 Post by guinness »

For me APNG kind of came and went. Even Chromium/Blink based browsers expect you to use an addon for support. What does that tell you?

User avatar
webfork
Posts: 10818
Joined: Wed Apr 11, 2007 8:06 pm
Location: US, Texas
Contact:

Re: The APNG format

#11 Post by webfork »

guinness wrote:For me APNG kind of came and went. Even Chromium/Blink based browsers expect you to use an addon for support. What does that tell you?
I really don't know why they wouldn't support a clearly and dramatically improved alternative to animated GIF. Maybe they think it will bleed support from a REAL video format (VP8 or whatever they're working on right now). Maybe Google wants to come up with new internet standards rather than Mozilla? Especially since Mozilla didn't impliment their JPEG alternative?

I'm guessing here, I have no idea. I'm used to better systems and protocols not being adopted for lame reasons, but given how active GIF remains on the internet relatively unchanged since ~1995, I'm confused by the lack of interest to update it in some way.

User avatar
Midas
Posts: 6705
Joined: Mon Dec 07, 2009 7:09 am
Location: Sol3

Re: The APNG format

#12 Post by Midas »

webfork wrote:I'm used to better systems and protocols not being adopted for lame reasons, but given how active GIF remains on the internet relatively unchanged since ~1995, I'm confused by the lack of interest to update it in some way.
  • Ditto. :?

User avatar
guinness
Posts: 4118
Joined: Mon Aug 27, 2007 2:00 am
Contact:

Re: The APNG format

#13 Post by guinness »

I guess HTML5 native video support should be used rather than gif images.

User avatar
SYSTEM
Posts: 2041
Joined: Sat Jul 31, 2010 1:19 am
Location: Helsinki, Finland

Re: The APNG format

#14 Post by SYSTEM »

guinness wrote:I guess HTML5 native video support should be used rather than gif images.
It's too hard to use at the moment. In particular, while there are free image hosting sites (for people who e.g. post on forums), free video hosting sites such as YouTube require the visitor to visit the site itself, which is a significant barrier. (Also, while an animated GIF typically lasts for a couple of seconds, a video can last for hours at most - and you don't know the length until you click.)

IMO, the world needs APNG. Too bad Google and Microsoft disagree. :(
My YouTube channel | Release date of my 13th playlist: August 24, 2020

User avatar
webfork
Posts: 10818
Joined: Wed Apr 11, 2007 8:06 pm
Location: US, Texas
Contact:

Re: The APNG format

#15 Post by webfork »

Great example of why the animated image isn't dead and couldn't be replaced by video: http://xkcd.com/1331/ (also just kinda cool)

Post Reply