View Full Version : Ubuntu's Firefox May Gain JPEG 2000 Support
phoronix
08-25-2009, 02:10 PM
Phoronix: Ubuntu's Firefox May Gain JPEG 2000 Support
JPEG 2000, the image file format that has been around for nearly a decade and offers better compression performance and greater flexibility in the code-stream that can allow for higher quality photographs compared to a traditional JPEG, may get a boost on the Linux desktop. JPEG 2000 hasn't seen much adoption in large part because of the lack of web browsers that natively support this JP2 ISO standard, including Firefox...
http://www.phoronix.com/vr.php?view=NzQ3OQ
dopehouse
08-25-2009, 02:34 PM
Does other OS software like GIMP and co support JPEG 2000 too? Who needs JPEG 2000?
chithanh
08-25-2009, 02:44 PM
All major open source image viewers/editors support JPEG 2000. For GIMP there exists a plugin (which will be included by default in GIMP 2.8).
I hope that Ubuntu will also consider adding MNG support to Firefox, which was removed by Mozilla in favour of their ill-fated APNG standard.
birdie
08-25-2009, 02:57 PM
It's worth noting that Konqueror started supporting JPEG2000 in 2006 or even earlier.
JeanPaul145
08-25-2009, 02:59 PM
I can honestly say that this isn't exactly news that gets my heart running a little faster, it simply isn't important enough to me.
And if it is patent-encumbered (why else would Mozilla be sued if they implemented support for it in FF?), I'm only leaning more towards saying "thanks, but no thanks", especially since it isn't THAT greatly used.
Ant P.
08-25-2009, 03:01 PM
AFAIK, Konqueror supports everything KDE itself does - which includes JPEG2k and MNG.
Last time I tried the GIMP plugin for MNG it was half-finished and pretty crap. The part I'm more interested in is JNG (JPEG compression + alpha transparency).
This APNG format is complete and utter garbage. I haven't seen a single app that actually supports reading it besides Firefox, never mind creating them. That makes it about as "Portable" as VML.
It only exists at all because one particular Mozilla developer is an awful troll, and his plan to kill off MNG in Mozilla - by setting impossibly tight library size requirements - backfired spectacularly; the MNG devs almost managed it before the rug was pulled out from under them. Go check out bug 18574 on bugzilla for the complete circus. It's a glimpse into the infantile politics that go on in Mozilla's inner circles.
chithanh
08-25-2009, 03:31 PM
The story of the MNG limbo in Mozilla is indeed a very sad one. It is notable that converting the animated GIFs which Firefox ships (for throbbers etc.) to MNG would actually reduce its size even if you count the additional code for MNG support.
Regarding JPEG 2000, it has some advantages over JPEG, eg. alpha transparency. The Wikipeda article (http://en.wikipedia.org/wiki/JPEG_2000) has all details.
bugmenot
08-25-2009, 03:45 PM
Last time I tried the GIMP plugin for MNG it was half-finished and pretty crap. The part I'm more interested in is JNG (JPEG compression + alpha transparency).
JPEG 2000 also supports transparency. And, unlike JNG, it is actually commonly used (and is much more efficient to boot).
This APNG format is complete and utter garbage. I haven't seen a single app that actually supports reading it besides Firefox, never mind creating them. That makes it about as "Portable" as VML.
There are already plenty of applications (http://littlesvr.ca/apng/) that can read and write such files, including a site (http://littlesvr.ca/apng/assembler/assembler.php) that makes construction of such files quite easy. All the modern browsers support the format (and none of them support MNG). There is already a patch (http://bugzilla.gnome.org/show_bug.cgi?id=151281) to add support to GTK+. I have seen the format pop up more and more lately, though, of course, only on sites with few IE users (such as userstyles.org). There is a clear need for something like APNG, which fulfils several needs that GIF fails to meet. Since APNG, unlike MNG, is actually supported, I expect APNG slowly to overtake GIF in the coming years. So, both your premiss that only Firefox supports the format and your conclusion that APNG isn’t portable are demonstrably false. I understand that you wish MNG were supported, but please don’t spread uninformed falsehoods.
ethana2
08-25-2009, 03:56 PM
Great! Now all they need is a patch to make it honor $XDG_CONFIG_HOME, a patch to make it work with gnome-globalmenu, and a patch to make it work with gnome keyring and somebody might mistake it for a native Ubuntu application :)
chaos386
08-25-2009, 04:02 PM
AFAIK, Konqueror supports everything KDE itself does - which includes JPEG2k and MNG.
Last time I tried the GIMP plugin for MNG it was half-finished and pretty crap. The part I'm more interested in is JNG (JPEG compression + alpha transparency).
This APNG format is complete and utter garbage. I haven't seen a single app that actually supports reading it besides Firefox, never mind creating them. That makes it about as "Portable" as VML.
It only exists at all because one particular Mozilla developer is an awful troll, and his plan to kill off MNG in Mozilla - by setting impossibly tight library size requirements - backfired spectacularly; the MNG devs almost managed it before the rug was pulled out from under them. Go check out bug 18574 on bugzilla for the complete circus. It's a glimpse into the infantile politics that go on in Mozilla's inner circles.
I'm probably going to regret this, but...
Even if Firefox is the only browser that supports APNG (there's an add-on (https://addons.mozilla.org/en-US/firefox/addon/5519) for making them too, by the way), it's still more than the userbase of MNG-supporting browsers, and people have tried to add APNG support to GIMP, but the developers are staunchly against it in favor of MNG (although they don't support MNG on all platforms, either).
What's the advantage of MNG from a practical standpoint, anyway? (and I really, really just mean this as an honest technical question. I've read up on the two formats in the past but could never really make heads or tails of the situation) The whole rationale behind APNG was that the first frame can still be decoded by programs that don't support it as long as they can decode PNGs.
chithanh
08-25-2009, 04:03 PM
Regarding APNG, Mozilla developers proposed it for inclusion in libpng, but got laughed out of the PNG group. The sole maintainer of the libpng APNG patches (http://littlesvr.ca/apng/) decided to stop working on it last year. Browser support (http://en.wikipedia.org/wiki/Comparison_of_web_browsers#Image_format_support) for APNG is limited to Opera and Mozilla based browsers (except Debian Iceweasel (http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=486209) and other Linux distros that build against system libpng instead of the Mozilla internal one).
Application support for MNG seems more widespread than APNG. Browser support is worse, although contrary to what has been claimed, Konqueror is a modern browser which supports MNG.
Ant P.
08-25-2009, 04:29 PM
Regarding JPEG 2000, it has some advantages over JPEG, eg. alpha transparency. The Wikipeda article (http://en.wikipedia.org/wiki/JPEG_2000) has all details.
Wow, I actually had no idea it could do that.
Kind of funny that Mozilla are worried about patents in JPEG 2000. I don't remember seeing them rushing to remove animated GIF support when Unisys started suing people left and right.
chaos386
08-25-2009, 09:25 PM
Kind of funny that Mozilla are worried about patents in JPEG 2000. I don't remember seeing them rushing to remove animated GIF support when Unisys started suing people left and right.
Probably because those patents (http://en.wikipedia.org/wiki/Graphics_Interchange_Format#Unisys_and_LZW_patent_ enforcement) expired before Firefox had its first release.
b15hop
08-26-2009, 05:15 AM
Tell me.. Why bother having a Jpeg 2000 format if no one uses it? This should have been done AGES ago...
drelyn86
08-26-2009, 10:10 AM
I thought the image format wars were over about 10 years ago...
and what advantages does it have over PNG?
energyman
08-26-2009, 02:36 PM
just use konqueror people. Firefox is badly ported windows software anyway.
About patents: submarine patents are a problem everywhere. This can only be changed, if the us patent office would finally wake up and ban/nullify all software related patents.
everywhere corrupt politicians try to introduce software patents - despite the fact that it is toxic for all and every kind of advancement :(
Ant P.
08-26-2009, 03:11 PM
Probably because those patents (http://en.wikipedia.org/wiki/Graphics_Interchange_Format#Unisys_and_LZW_patent_ enforcement) expired before Firefox had its first release.
You do know what Mozilla is, right? The MNG farce extends back long before Firefox existed.
chaos386
08-26-2009, 03:56 PM
You do know what Mozilla is, right? The MNG farce extends back long before Firefox existed.
Yes, I know what Mozilla is, but I assumed he was only talking about Firefox, since back in the Netscape days, they could have easily had a license for GIF, and not enough people used vanilla Mozilla back in the day to make it a worthwhile target to sue. Plus, GIF was a lot more widespread back then than JPEG2000 is now, making it more important to support.
Or maybe the guy who developed JPEG2000 drove over one of the Mozilla developer's cats, who knows?
RealNC
08-26-2009, 04:04 PM
just use konqueror people.
Konqueror totally sucks. Well, for me at least.
Ant P.
08-26-2009, 05:02 PM
Firefox 2 with its weird slow GTK emulation sucked harder than Konqueror did. It's a shame Konqueror hasn't done much since then, if it had an extension API (preferably not limited to JS) I'd use it.
agd5f
08-26-2009, 06:09 PM
I'm sure all distros would consider shipping a patch if one existed.
deanjo
08-26-2009, 07:21 PM
I'm sure all distros would consider shipping a patch if one existed.
I wouldn't be so sure of that. Some distro's like openSUSE/SLED and RH/Fed err on the side of caution when it comes to items that may cause potential legal issues.
laststop
08-30-2009, 04:31 AM
Does other OS software like GIMP and co support JPEG 2000 too? Who needs JPEG 2000?
NASA likes to release big images from Mars in JPEG2000.
http://hiroc.lpl.arizona.edu/images/jp2.html
makomk
08-30-2009, 05:13 PM
Regarding JPEG 2000, it has some advantages over JPEG, eg. alpha transparency. The Wikipeda article (http://en.wikipedia.org/wiki/JPEG_2000) has all details.
The trouble is, very little actually supports the alpha transparency feature. In fact, ImageMagick actually aborts with an assertion failure if you try loading a transparent JPEG2000 image, and I don't think it's the only program with this issue.
Tell me.. Why bother having a Jpeg 2000 format if no one uses it? This should have been done AGES ago...
Well, JPEG 2000 isn't really any better quality-wise than JPEG, it's much slower (especially the open source implementations), and it's patent-encumbered. Why would it see widespread adoption?
energyman
08-30-2009, 09:16 PM
because you are wrong. Jpeg2000 is A LOT better than jpeg.
nanonyme
08-31-2009, 01:06 AM
http://en.wikipedia.org/wiki/JPEG_2000#Features *shrug* Seems to be better than JPEG mostly on limited-bandwidth scenarios. If you're free to use as much space as you want for the images, difference is negligible.
energyman
08-31-2009, 02:01 AM
>Compared to the previous JPEG standard, JPEG 2000 delivers a typical compression gain in the range of 20%, depending on the image characteristics. Higher-resolution images tend to benefit more, where JPEG-2000's spatial-redundancy prediction can contribute more to the compression process. In very low-bitrate applications, studies have shown JPEG2000 to be outperformed[2] by the intra-frame coding mode of H.264. Good applications for JPEG 2000 are large images, images with low-contrast edges — e.g., medical images.
makomk
08-31-2009, 08:52 AM
>Compared to the previous JPEG standard, JPEG 2000 delivers a typical compression gain in the range of 20%, depending on the image characteristics. Higher-resolution images tend to benefit more, where JPEG-2000's spatial-redundancy prediction can contribute more to the compression process. In very low-bitrate applications, studies have shown JPEG2000 to be outperformed[2] by the intra-frame coding mode of H.264. Good applications for JPEG 2000 are large images, images with low-contrast edges — e.g., medical images.
It also takes ten times longer to decompress than normal JPEG, at least with the open-source implementations. I'm not exaggerating - I actually tested this:
[aidan@yarrow 4 tmp] 0$ identify test-in.jpg
test-in.jpg JPEG 1920x1200 1920x1200+0+0 8-bit DirectClass 863kb
[aidan@yarrow 4 tmp] 0$ time convert test-in.jpg test-out.pnm
real 0m0.276s
user 0m0.171s
sys 0m0.045s
[aidan@yarrow 4 tmp] 0$ time convert test-in.jp2 test-out.pnm
real 0m2.138s
user 0m1.725s
sys 0m0.161s
(This is Jasper, since that's what ImageMagick uses. Unfortunately, it looks like the other library OpenJpeg is just as slow. OpenJpeg 2.0 may be faster, but it's still in the alpha stage.)
Unless you're downloading a very big image to a very fast PC on a very slow connection, I'm not convinced it's worth it.
nanonyme
08-31-2009, 09:15 AM
Why would image conversion rate have any significance as to whether it should be adopted or not? Surely the only important part is how fast it's rendered.
makomk
08-31-2009, 09:54 AM
Why would image conversion rate have any significance as to whether it should be adopted or not? Surely the only important part is how fast it's rendered.
Unless graphics cards have gained hardware JPEG 2000 support without me noticing, rendering the image requires converting it to an uncompressed format - which is what those commands are testing.
Rip-Rip
08-31-2009, 10:30 AM
Unless graphics cards have gained hardware JPEG 2000 support without me noticing, rendering the image requires converting it to an uncompressed format - which is what those commands are testing.
Actually, the rendering will be faster, thanks to wavelets, because you don't need the whole image to be decoded. On Jpeg you need to decode the whole image, which, on very large image could be very long. On JPEG2000 you could decode a part of the image, for example, what you're currently looking at.
laststop
09-01-2009, 10:23 AM
The sole maintainer of the libpng APNG patches (http://littlesvr.ca/apng/) decided to stop working on it last year.
Actually, you link shows that APNG patch is alive and well.
Application support for MNG seems more widespread than APNG.
But how many of them still work? I tried official gif2mng converter, and it wouldn't work for me at all.
b15hop
09-02-2009, 04:31 AM
Yes Ming does look interesting
http://www.libpng.org/pub/mng/
vBulletin® v3.8.4, Copyright ©2000-2009, Jelsoft Enterprises Ltd.