Beyond JPEG

It's surprising that the venerable JPEG image compression standard, which dates back to 1986, is still the best we can do for photographic image compression. I can't remember when I encountered my first JPEG image, but JPEG didn't appear to enter practical use until the early 90's.

This is a companion discussion topic for the original blog entry at:

Some cool demos of JPEG 2000 wavelet file streaming via the jpip:// protocol handler:

Just to expose my ignorance on image formats, does PNG compare to jpeg 2000 or HD Photo?

Neither, PNG is a lossless format, and jpeg2k (and HD Photo I assume) uses wavelets, which are inherently lossy.

Chris -

The “standard” advice regarding PNGs is to use them in cases where there’s a great deal of flat color, but not for photorealistic images, as photorealistic images don’t compress nearly as well in PNG.

On a related note, I really wouldn’t mind seeing widespread MNG or APNG support for animation, but I guess that train has left the station, as most people seem happy to use some sort of plugin or JS hack for animation, or even fall back to GIF.

Also, is it just me, or are the JP2 links broken right now?


Microsoft only got PNG support in IE7

Not exactly true - MS only got transparency support for PNG in IE7. IE6 support non-transparent PNGs just fine.

“No current web browsers can render JPEG 2000 (.jp2) images…”

Not so; Safari can view JPEG 2000 just fine.

Moving the entire world to a new standard is a huge task.

Jpeg2000 simply isn’t enough of an improvement to get the world to switch from Jpeg.

Hmm, looks like you’re right. Safari appears to support JPEG 2000. Evidently there was some kind of vulnerability in JPEG 2000, too. Here are links to the JP2 version of the images above if your browser supports it:

Here’s a compression factor 10 JPEG of the original 512x512 Lena image (96,934 bytes)

Here’s a JPEG 2000 of the original 512x512 lena image (96,875 bytes)

Original uncompressed Lena can be downloaded here:

Jpeg2000 simply isn’t enough of an improvement to get the world to switch from Jpeg.

At high bitrates, I agree. But at low bitrates (eg the examples shown in my post), it’s a HUGE improvement.

Not so; Safari can view JPEG 2000 just fine.

Well, sorta. It’s the QuickTime plugin. (And it also works for Firefox AFAICT)

The plugin approach probably means you can’t use JPEG 2000 for more advanced rendering such as background images, etc.

as a digital photographer, this makes me very excited! I cant wait.

No, Safari views JPEG 2000 natively. (More accurately, WebKit does, as it works in OmniWeb too.) It does not require the QuickTime plug-in.

I proved this by renaming my Internet Plug-Ins folder, so that Safari wouldn’t be able to find the QuickTime plug-in (or any others). Worked fine.

i did notice when i went to view those jp2 images that quicktime automatically started up and rendered the images, the quality didn’t look very good though.

In think JPEG2000 and equivalent file formats are more than just a better compression mechanism than JPEG taken at the same quality level.

JPEG2000 includes Level Of Details (LOD) based not just on interesting maths objects (wavelets), that enables interactive zoom, better network streaming, and so on.

JPEG2000 enables a new class of applications. I think Microsoft’s photosynth is an example of that.

Well, under decent Operating Systems which use the concept of shared data conversion functions (ie. Addons / Translators under BeOS, DataTypes under Amiga), once you’ve added a single library which can decipher the new format, every single application, even those written decades ago, gain the ability to work with the new image format.

Been using JPEG 2000 under BeOS for over 6 years now. But as usual, the rest of the world takes ages to catch up. Heck, even Haiku can display JPEG2000 without any issues, and the OS isn’t even in Alpha stage yet.

JPEG is a widespread, semi-standard image format. But most of all, it is good enough, and it scales. There’s just no reason to switch to JPEG 2000 or some other “improved JPEG format” right now, except for very special applications you won’t find on the web.

Most people wouldn’t even notice the difference, unless they compare the pictures side-by-side like above. In cases where it WOULD make a difference, the JPEG creators just notch up the JPEG quality setting. Who cares wether it’ll take a couple kbytes more nowadays?

JPEG gets the picture across. In the example above, I see four times the same woman with a hat and purple thingamabob. I notice the difference in quality, but frankly i don’t care, because whatever format, i am still able to get the “message” of the picture regardless of the subjective minus 10% loss of image quality.

So, my point being: unless pr0n sites start using JPEG 2000, it’ll never become a standard format of the web. :wink:

Interestingly the original JPEG standard misses a trick when it comes to file size. Once the lossy algorithms have been applied the format then takes the still relatively high entropy data and RLE encodes it. Run Length Encoding is pretty much the most basic compression method there is - even the humble fax machine manages it and they aren’t exactly computational power-houses.

You can shrink the filesize on any JPEG image with out losing quality by just RLE docoding it and re-compressing it withe the compression method of your choice. If you were to invent a new standard for the web, GZip would probably be the best since it is supported in all modern browsers as it is the basis of HTTP-compression.

It would be interesting to compare the images you provided against standard JPEGs that use a different final lossless algorithm. That would be the true test of the JPEG 2000/MS HD Photo formats.

I think steffenj is right - as a user JPEG is good enough. If you want better quality, make a bigger JPEG. It’s not often my bandwidth is so restricted that a few JPEG2000s would make all the difference. Bandwidth mostly restricts video and large binaries.

From the perspective of a site with a lot of JPEGs and a huge audience the difference might be worth it for the bandwidth bill, I suppose.

On a related side note, the way JPEG compression works is fascinating. I recommend having a look at it. Dig those Discrete Fourier Transforms, baby!

It’s funny that the previous article was “What’s in a version number anyway”, which talks about how Microsoft switched to using years to describe its software products (Windows 2000, Office 2003, 2007). In that context, it’s funny that JPEG 2000 will be considered by some to be obsolete.

It also seems that JPEG 2000 is doomed to failure because of the patent issue. Even if it’s just the perception that the standard is hindered by patents, it still affects its adoption. Another thing is that the standard is described using floating point math. One of the main applications might be embedded systems (e.g., digital cameras), which often do not have a built-in floating point unit and need to rely on slow software floating point emulation.

Personally, after reading this, I am far more interested in Microsoft’s HD Photo format, as the standard is described using only integer or fixed point math, thus making it reasonable for smaller embedded systems.

I found this really cool HD photo tech demo, by the way: