Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
APNG not supported by libpng viewers?
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Multimedia
View previous topic :: View next topic  
Author Message
avx
Advocate
Advocate


Joined: 21 Jun 2004
Posts: 2070

PostPosted: Wed Nov 07, 2012 11:59 am    Post subject: APNG not supported by libpng viewers? Reply with quote

I was just p*ssed again by not having any decent and simple viewer for animated GIFs, as `animate` from imagemagick often has problems with the framerate. Also I've got no clue why each and every (major) webbrowser does it right, always.

Anyway, I tried gif2apng and the resulting .png works in Opera and Firefox, though not in Chromium and dwb, seems to be a webkit(-gtk) problem.

So I tried with a few imageviewers based on libpng, sxiv and feh to be exact, but they also fail with
Code:
libpng error: internal row size calculation error


Is there just no support for it in libpng, are the apps the problem or what? Any decent way to view animations of this kind?

Edit, libpng is of course merged with USE=apng.
Edit2, gqview at least shows the first frame, but that's it(so the same situation as with gifs).
_________________
++++++++++[>+++++++>++++++++++>+++>+<<<<-]>++.>+.+++++++..+++.>++.<<+++++++++++++++.>.+++.------.--------.>+.>.
Back to top
View user's profile Send private message
VoidMage
Watchman
Watchman


Joined: 14 Oct 2006
Posts: 5429

PostPosted: Wed Nov 07, 2012 12:23 pm    Post subject: Reply with quote

Well, in the end it comes down to this - apng extension has never been accepted by libpng upstream (even though it is somewhat useful).
That in turn resulted in it not being supported by gdk-pixbuf loaders and that's what the simple viewers are based upon (at least on gtk side).
Back to top
View user's profile Send private message
Ant P.
Advocate
Advocate


Joined: 18 Apr 2009
Posts: 2278
Location: UK

PostPosted: Wed Nov 07, 2012 6:15 pm    Post subject: Reply with quote

It's a Mozilla-specific extension to the file format. Other programs don't magically gain animation when it's compiled in, they have to explicitly support it.
Back to top
View user's profile Send private message
VoidMage
Watchman
Watchman


Joined: 14 Oct 2006
Posts: 5429

PostPosted: Wed Nov 07, 2012 6:26 pm    Post subject: Reply with quote

Ant P. wrote:
It's a Mozilla-specific extension to the file format.

Not really.
It's an extension, that xulrunner based apps eagerly adopted, but AFAIK the idea itself has not been driven by Mozilla.
Back to top
View user's profile Send private message
maxst
n00b
n00b


Joined: 13 Nov 2012
Posts: 6

PostPosted: Tue Nov 13, 2012 10:42 am    Post subject: Reply with quote

VoidMage wrote:
Well, in the end it comes down to this - apng extension has never been accepted by libpng upstream (even though it is somewhat useful).


It doesn't really stop people from using apng-patched version of libpng.

VoidMage wrote:
That in turn resulted in it not being supported by gdk-pixbuf loaders and that's what the simple viewers are based upon (at least on gtk side).


Well, in theory, someone could write apng patch for gdk-pixbuf too.
Back to top
View user's profile Send private message
Ant P.
Advocate
Advocate


Joined: 18 Apr 2009
Posts: 2278
Location: UK

PostPosted: Tue Nov 13, 2012 12:29 pm    Post subject: Reply with quote

VoidMage wrote:
Ant P. wrote:
It's a Mozilla-specific extension to the file format.

Not really.
It's an extension, that xulrunner based apps eagerly adopted, but AFAIK the idea itself has not been driven by Mozilla.

No, it's a Mozilla-specific extension to the file format. They invented it in a hurry because they wanted an excuse to not support MNG.
Back to top
View user's profile Send private message
VoidMage
Watchman
Watchman


Joined: 14 Oct 2006
Posts: 5429

PostPosted: Tue Nov 13, 2012 5:07 pm    Post subject: Reply with quote

Ant P. wrote:
VoidMage wrote:
Ant P. wrote:
It's a Mozilla-specific extension to the file format.

Not really.
It's an extension, that xulrunner based apps eagerly adopted, but AFAIK the idea itself has not been driven by Mozilla.

No, it's a Mozilla-specific extension to the file format. They invented it in a hurry because they wanted an excuse to not support MNG.

Well, OK, though there's no need for an excuse to not support MNG - it's not like anyone supports it for real.
Back to top
View user's profile Send private message
Ant P.
Advocate
Advocate


Joined: 18 Apr 2009
Posts: 2278
Location: UK

PostPosted: Tue Nov 13, 2012 6:14 pm    Post subject: Reply with quote

It works in Konqueror. Has decent support in GIMP too. I'll admit it is becoming obsolete now, the only worthwhile feature in it was JPEG with alpha which is better done by WebP nowadays.
Back to top
View user's profile Send private message
maxst
n00b
n00b


Joined: 13 Nov 2012
Posts: 6

PostPosted: Tue Nov 13, 2012 6:35 pm    Post subject: Reply with quote

Actually, that first link disproves "in the hurry" claim. APNG landed in Firefox 3.0 in 2008. But that bugzilla entry was created in 2004, a few months before Firefox 1.0 release.

If anything, they were extremely slow to add those 1200 lines of C to libpng.

And you can guess how many hundreds of thousands lines of C is in the extremely complex libmng.
Back to top
View user's profile Send private message
Ant P.
Advocate
Advocate


Joined: 18 Apr 2009
Posts: 2278
Location: UK

PostPosted: Tue Nov 13, 2012 7:46 pm    Post subject: Reply with quote

maxst wrote:
Actually, that first link disproves "in the hurry" claim. APNG landed in Firefox 3.0 in 2008. But that bugzilla entry was created in 2004, a few months before Firefox 1.0 release.

If you pay attention, you can see it came just months after they took the existing, working MNG support out of Firebird and made unrealistic code size demands on having it re-included. Demands which the libmng maintainers went to the effort of meeting repeatedly, as they became more and more ridiculous until Mozilla decided to use the nuclear option and fork libpng to get rid of these pesky free software contributors once and for all.

Yes, it's true that the browser went 4 years with reduced functionality, but that was because of the childish attitudes of the libpr0n module owners.

Quote:
If anything, they were extremely slow to add those 1200 lines of C to libpng.

And you can guess how many hundreds of thousands lines of C is in the extremely complex libmng.

I don't have to guess, and I find your vagueness suspect, as the source is right here for anyone to see. As a superset of PNG with JPEG and animation support it only takes twice as many "lines" as libpng, whatever that measure is worth.

Just so everyone is being honest and open here, what is your connection to APNG/Mozilla? Your account is obviously created for this thread and you're being very defensive for no apparent reason.
Back to top
View user's profile Send private message
VoidMage
Watchman
Watchman


Joined: 14 Oct 2006
Posts: 5429

PostPosted: Tue Nov 13, 2012 8:25 pm    Post subject: Reply with quote

Ant P. wrote:
Yes, it's true that the browser went 4 years with reduced functionality, but that was because of the childish attitudes of the libpr0n module owners.

Any sources documenting that (mail archives, bugzilla entries, etc.) ?
Back to top
View user's profile Send private message
Ant P.
Advocate
Advocate


Joined: 18 Apr 2009
Posts: 2278
Location: UK

PostPosted: Tue Nov 13, 2012 8:33 pm    Post subject: Reply with quote

VoidMage wrote:
Any sources documenting that (mail archives, bugzilla entries, etc.) ?

There's that one 900-comment bugzilla thread I linked to above as a starting point. It's a painful read but most of it is there.
Back to top
View user's profile Send private message
maxst
n00b
n00b


Joined: 13 Nov 2012
Posts: 6

PostPosted: Tue Nov 13, 2012 8:58 pm    Post subject: Reply with quote

Ant P. wrote:
It works in Konqueror.


I tried Konqueror and it doesn't work for me on libmng.com

Ant P. wrote:
Has decent support in GIMP too.


So "decent" that it can't load MNG. And it would often crash while saving MNG. See, this bug from 2008 is still open:
https://bugzilla.gnome.org/show_bug.cgi?id=555777
Back to top
View user's profile Send private message
maxst
n00b
n00b


Joined: 13 Nov 2012
Posts: 6

PostPosted: Tue Nov 13, 2012 9:13 pm    Post subject: Reply with quote

Ant P. wrote:
As a superset of PNG with JPEG and animation support it only takes twice as many "lines" as libpng, whatever that measure is worth.


Twice as much as libpng? Sounds about right. Compare it with APNG patch that adds like 5% to libpng size.

Ant P. wrote:
Just so everyone is being honest and open here, what is your connection to APNG/Mozilla? Your account is obviously created for this thread and you're being very defensive for no apparent reason.


I have no connections to Mozilla, but I maintain that 1200-lines APNG patch, which is used by gentoo and others.
Back to top
View user's profile Send private message
VoidMage
Watchman
Watchman


Joined: 14 Oct 2006
Posts: 5429

PostPosted: Tue Nov 13, 2012 11:08 pm    Post subject: Reply with quote

maxst wrote:
Ant P. wrote:
As a superset of PNG with JPEG and animation support it only takes twice as many "lines" as libpng, whatever that measure is worth.


Twice as much as libpng? Sounds about right. Compare it with APNG patch that adds like 5% to libpng size.


AFAICT, this comparison is highly unfair, as libmng offered other functionality too (i.e. mentioned in that bug JNG).

While I'm not fully convinced, those JPEG-XR comments suggest, that a better long term solution lost due to ego/NIH issues.
Back to top
View user's profile Send private message
maxst
n00b
n00b


Joined: 13 Nov 2012
Posts: 6

PostPosted: Wed Nov 14, 2012 7:35 am    Post subject: Reply with quote

VoidMage wrote:
AFAICT, this comparison is highly unfair, as libmng offered other functionality too (i.e. mentioned in that bug JNG).


Most of that added functionality in MNG is completely useless. Just look at the MAGN chunk that can hold up to 6 different magnification factors (!) for different areas of the image, and up to 5 different magnification methods (!) in each direction. This is insanity.

Or look at the Delta-PNG datastream, its "pixel addition" algorithm is very hard to implement efficiently. Thankfully APNG is limited to standard alpha-blending method that can be found in graphics APIs in all modern systems, and it can be hardware-accelerated. Who wants to process every pixel component of every pixel on a CPU for that "pixel addition"? This is a recipe for draining the batteries. For GIF and APNG you can simply invoke a standard high-level API function to blend one frame on top of another, and the OS will handle hardware-acceleration for you.

MNG is the textbook example of http://en.wikipedia.org/wiki/Feature_creep

APNG is the textbook example of http://en.wikipedia.org/wiki/KISS_principle
Back to top
View user's profile Send private message
VoidMage
Watchman
Watchman


Joined: 14 Oct 2006
Posts: 5429

PostPosted: Wed Nov 14, 2012 1:22 pm    Post subject: Reply with quote

maxst wrote:
VoidMage wrote:
AFAICT, this comparison is highly unfair, as libmng offered other functionality too (i.e. mentioned in that bug JNG).


MNG is the textbook example of http://en.wikipedia.org/wiki/Feature_creep

APNG is the textbook example of http://en.wikipedia.org/wiki/KISS_principle


Probably, still the way mozila devs handled the problem looks like a textbook example of potentially superior solution lost due to ego/NIH issues.

Honestly, it was there over 8 years ago - by now it could have been i.e. split into submodules, with the useful solutions being adopted widely now, with all that time available.
Back to top
View user's profile Send private message
avx
Advocate
Advocate


Joined: 21 Jun 2004
Posts: 2070

PostPosted: Wed Nov 14, 2012 1:40 pm    Post subject: Reply with quote

[Kayne West]Imma let you finish, but ... anyone knows a decent non-GTK/QT/Browser-viewer for either .gif or .(a)png?[/Kayne West]
_________________
++++++++++[>+++++++>++++++++++>+++>+<<<<-]>++.>+.+++++++..+++.>++.<<+++++++++++++++.>.+++.------.--------.>+.>.
Back to top
View user's profile Send private message
maxst
n00b
n00b


Joined: 13 Nov 2012
Posts: 6

PostPosted: Wed Nov 14, 2012 3:07 pm    Post subject: Reply with quote

VoidMage wrote:
Probably, still the way mozila devs handled the problem looks like a textbook example of potentially superior solution lost due to ego/NIH issues.


Superior solution is apng, and it's not lost at all.

avx wrote:
[Kayne West]Imma let you finish, but ... anyone knows a decent non-GTK/QT/Browser-viewer for either .gif or .(a)png?[/Kayne West]


Try XnViewMP:

http://newsgroup.xnview.com/viewtopic.php?f=60&t=26033
Back to top
View user's profile Send private message
avx
Advocate
Advocate


Joined: 21 Jun 2004
Posts: 2070

PostPosted: Wed Nov 14, 2012 4:41 pm    Post subject: Reply with quote

maxst wrote:
Try XnViewMP:

http://newsgroup.xnview.com/viewtopic.php?f=60&t=26033
Erm, 25mib package, linked against Qt and phonon? Thanks, but no thanks(though it's working).
_________________
++++++++++[>+++++++>++++++++++>+++>+<<<<-]>++.>+.+++++++..+++.>++.<<+++++++++++++++.>.+++.------.--------.>+.>.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Multimedia All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum