It is currently Sat Apr 20, 2024 10:02 am


All times are UTC - 5 hours [ DST ]



Post new topic Reply to topic  [ 6 posts ] 
Author Message
 Post subject: some tools for APNG and gif
PostPosted: Sun Jul 30, 2017 6:11 am  (#1) 
Offline
GimpChat Member

Joined: Mar 04, 2011
Posts: 2419
Tas_mania wrote in another thread about an animated png (apng)

Quote:
.. Interesting thats its a PNG? At 4.6Mb its fairly big for fast page
loads but the quality is better than GIF and the net is slowly getting faster. I'm always looking for formats that are better quality than GIF but can be viewed on all browsers.


That last bit is the killer, apng is not supported by all browsers.

However, for those interested what can you do with an animated png

This is mainly for linux users but all applications mentioned are available for Windows.

Making them
There is a apng plugin for Gimp. It has not worked for me in linux since Gimp 2.6.x AFAIK the png libs are not compiled with apng support. I believe it still works in Windows.

This one works ok. A java application. https://www.reto-hoehener.ch/japng/ looks like this: http://i.imgur.com/VuFROZf.jpg

Decompiling apng.

XNviewMP works quite well. Use Create -> Multi-page-file and export as a tif for Gimp. http://i.imgur.com/j3QP3IK.jpg

From Gimp to individual png's (any number of plugins for this) then

ImageMagick to convert to individulal gif files using mogrify http://i.imgur.com/icEdvLa.jpg ImageMagick like Gimp will create an animated gif with a single colormap, so keep as individual gif files.

Converting to a gif.
Never going to be as good as apng, but you can keep some of the colours if you use command line gifsicle https://www.lcdf.org/gifsicle/ A real PITA to use, but it does tell you that individual colormaps are used. http://i.imgur.com/lOyWzOE.jpg

No good opening in Gimp, which will reduce the colormap to a common 256 colours.

And yes, I got the stack inverted when exporting from Gimp ;) http://imgur.com/0lULNIr

What is the difference in file size. The apng is 4.5 MB the gif is 2.3 MB

_________________
Image


Share on Facebook Share on Twitter Share on Orkut Share on Digg Share on MySpace Share on Delicious Share on Technorati
Top
 Post subject: Re: some tools for APNG and gif
PostPosted: Sun Jul 30, 2017 7:28 am  (#2) 
Offline
GimpChat Member
User avatar

Joined: Nov 04, 2015
Posts: 1333
Thanks rich2005. Another very informative post. I will have to try the java app for converting to APNG.
I'm also planning an attempt at compiling the APNG plugin for Ubuntu64.
Gimp Chat had a thread on compiling APNG in 2010 which now looks like the 'Golden Age' of Gimp plugins
(excluding G'Mic-QT :))
http://gimpchat.com/viewtopic.php?f=9&t=195
Quote:
I got the stack inverted when exporting from Gimp

I solve that problem using the 'reverse/mirror layers' script which I think is part of AnimStack.
http://registry.gimp.org/node/26501
AnimStack works on Gimp 2.8 and has another very useful feature.
It can be used to apply text to all layers, or to mask out parts of all layers by putting a modified layer at the top,
renaming it 'Layer [fg]' then process AnimStack tags, then Image>flatten layer groups.
Sometimes you just need to repair something on all layers. AnimStack can do that. I should find out what the other 'tags' are.
I think the book on Gimp animation has already been written, then mostly forgotten and then a lot of it stopped working as Gimp was further developed. :pengy


Top
 Post subject: Re: some tools for APNG and gif
PostPosted: Mon Jul 31, 2017 7:12 am  (#3) 
Offline
GimpChat Member
User avatar

Joined: Nov 04, 2015
Posts: 1333
I called this 'Billboard at Night'. I saved it as APNG but at 13Mb it was a bit big to post here.

Image

I used the Java app suggested by Rich2005 and the quality is very good.
The APNG image is here:
http://i.imgur.com/rbgTKp9.png
A proprietary gifv version is here:
http://i.imgur.com/7Ny06qg.gifv
The gifv quality rivals that of animated PNG in my opinion.


Top
 Post subject: Re: some tools for APNG and gif
PostPosted: Fri Aug 04, 2017 8:35 am  (#4) 
Offline
GimpChat Member
User avatar

Joined: Nov 04, 2015
Posts: 1333
I've been doing some research on recent file formats for publishing animation.

WEBP. These files are still very big and you can only view them with Chrome browsers. Why bother?

BPG. A lot of potential, supposed to support animation although almost none exist online.

FLIF. Free Lossless Image Format. Better compression than the rest but still under development. Interestingly, FLIF starts playing while it's loading. Reminds me of 'lazy loading' slide show viewers.

WEBM. I settled on this as the best for today. From Gimp you save as avi or mp4. Then convert to webm. I used 'FFMulticonverter'.
From there you can upload or embed the video directly.
WEBM results in incredibly small files. A 13Mb APNG went all the way down to 106kB.

This is a 160kb animation.
https://gfycat.com/ArcticFrigidEskimodog


Last edited by Tas_mania on Fri Aug 04, 2017 6:16 pm, edited 1 time in total.

Top
 Post subject: Re: some tools for APNG and gif
PostPosted: Fri Aug 04, 2017 2:20 pm  (#5) 
Offline
GimpChat Member

Joined: Mar 04, 2011
Posts: 2419
A bit of graphics/video history

The way video files are compressed (the 'co' bit of codec) obviously determines the file size. Just the same as comparing a png (lossless) with a jpeg (lossy)

The APNG is very large because each frame is a complete, stand-alone image. Your example which I downloaded as rgbTKp9.png - 92 individual frames - 12.9 MB

You could convert those to jpeg and make a video - a motion jpeg where each frame is a complete picture 92 individual frames - 1.4 MB and if you ever want to do that using FFMPEG

ffmpeg -framerate 10 -pattern_type glob -i '*.jpg' -vcodec mjpeg  out.avi


Not many cameras use MJPEG these days, so the 92 png's rendered as mp4 is much smaller 0.8 MB

ffmpeg -framerate 10 -pattern_type glob -i '*.png' -c:v libx264 -pix_fmt yuv420p out.mp4


Why much smaller, it is the encoding. The first frame is a full picture, an 'I' frame. Subsequent frames are vector references to groups of pixels, 'B' frames and 'P' frames.

Your video which I got as 7Ny06qg.mp4 was smaller again, 0.56 MB
Why? One 'I' frame, all the rest 'P' frames. Very tightly compressed, very much never to be edited again.

Back to history,
Why would anyone want to use MotionJpeg? The format goes back so far, no-one can patent it. Unlike mp4 which is owned by the evil mpeg licensing authority
see: https://en.wikipedia.org/wiki/MPEG_LA

example: Read the small print for the video format on your expensive digital camera. Publish your video on say youtube and sometime in the future you might have to pay royalties.
Has not happened yet, but it might one day. :)

_________________
Image


Top
 Post subject: Re: some tools for APNG and gif
PostPosted: Sat Aug 05, 2017 2:28 am  (#6) 
Offline
GimpChat Member
User avatar

Joined: Nov 04, 2015
Posts: 1333
The webm format is really a HTML5 video format. To be able to produce them from Gimp means a designer or artist can generate an end product quickly and easily.

It's good rich has bought-up some history. These files are ridiculously small but hey! You still need a web server, computer device and network to see them on. An old film spool with cartoons from the 1930's was useless without a projector, screen and theater to view them. The really big advance is that technology has given everybody the potential to do what only studios and media networks once did :paint


Top
Post new topic Reply to topic  [ 6 posts ] 

All times are UTC - 5 hours [ DST ]


   Similar Topics   Replies 
No new posts Attachment(s) APNG (animated PNG) plug-in for Gimp 2.10 Windows64x

4

No new posts GIF animation tools

3

No new posts Attachment(s) Locked tools - PLEASE, PLEASE HELP!

8

No new posts Attachment(s) Gimp 2.10.20 Set Tools Groups to OFF

0

No new posts Attachment(s) Some Icons has disappeared from my tools box

4



* Login  



Powered by phpBB3 © phpBB Group