JPEG2000 vs JPEG (vs TIFF)
Imaging - Imaging

Introduction

JPEG2000 is a fairly new standard which was meant as an update of the wide-spread JPEG (Joint Photographic Expert Group) image standard. JPEG2000 may share its name with the older standard but under the skins the relationship between the two is next to nil. The lossy image compression mode of JPEG2000 is based on the so-called "discrete wavelet transformation" which is supposed to be more efficient compared to the JPEG algorithm based on "cosine transformation"..

Now where's the beef ... ? JPEG2000 offers ... (citing the JPEG2000 FAQ at http://www.jpeg.org)
  • Better efficiency in compression (incl. 48 bit color depth support)
  • Possibility of lossless compression>
  • Decoding with different output resolutions>
  • A process to calculate the integrated bit rate (possibility of reaching an aimed bit rate)
  • Dividing the image into smaller parts to be coded independently from the others
  • Improvement in noise resilience
  • Access to the compressed bit rate at any point in order to access the image directly
  • Better performances in coding/decoding through many different cycles
  • More flexible file format

The current reality

Similar to JPEG there's no requirement to implement to complete standard which can result in incompatibilities between different applications (it was the same in the early days of JPEG). While the complexity of the implementation didn't really help to boost the acceptance in the field JPEG2000 is now slowly entering the mainstream. The very latest imaging applications often offer a JPEG2000 file format though it still tends to be limited to 24 bit color depth.
The relatively harsh computing requirements have probably prevented the adaptation in digital cameras so far.

The Tool

Test Environment:
Photoshop 6 with JPEG2000 Plug-in from http://www.fnordware.com/
The plug-in is free and unlike many competitors it seems to be a usable implementation incl. lossless mode and especially 48bit color support. Some special features are not implemented but for normal image archiving the Fnord implementation is just fine. The plug-in is available both for Win as well as Mac for Photoshop 5.5 & up.

The JPEG2000 dialog box is pretty simple. You can select between lossy and lossless compression. In lossy mode you can select whether to focus either on a specific target file size or an abstract quality level. The tool automatically switches between 24bit or 48bit storage dependent on the color depth of the raw image in Photoshop.



Let's have a look at it ...

The analyzed image has a raw size of about 2 MB (= 1024 x 669 pixel, 24 bit color depth).
At 100% quality (Photoshop JPEG quality = 12) JPEG gives us a compression of 990 KB vs 810 KB with JPEG2000. So at 100% quality the compression is a little better than 1:2 here. Right from the start JPEG2000 has a 20% advantage here - not extreme but more than nothing.

Below you can find an image portion comparison of JPEG and JPEG2000 normalized to a specific compression level (except at 100% quality):







JPEG2000
set to 0.09MB
JPEG
Level 0
"low quality"
0.09MB
JPEG2000
set to 0.17MB
JPEG
Level 4
0.17MB
JPEG2000
set to 0.30MB
JPEG
PS Level 8
"high quality"
0.30MB
JPEG2000
100%
0.81 MB
JPEG
PS Level 8 (100%)
0.99 MB

As expected the difference in quality is next to zero when comparing images with a quality level of 100% but there're some more or less obvious differences at more bold compression rates.

Let's start having a look at the extreme end - at a compression rate of 1:20. See the left 2 pictures in the image row above as a reference without magnification.

The following images are ENLARGED BY 200% for a better illustration of the differences:




ORIGINAL IMAGE JPEG2000 1:20
JPEG 1:20

A compression rate of 1:20 is quite extreme and naturally even JPEG2000 can't recreate the fine structures of the original image. Nonetheless it does a much better job than JPEG here. You may notice that the (in-)famous blocks (the 8x8 pixel blocks from the cosine transformation) are no longer present in the JPEG2000 image. The halo artifacts around contrast transitions (e.g. roof to sky) are also much less pronounced and there're no extreme color defects. Overall the JPEG2000 result looks soft, like sprinkled with water, but it isn't completely unusable like the JPEG result.

Ok, let's have a look at a much more conservative compression rate - Photoshop JPEG Level 8 ("High Quality") or a compression rate of about 1:7 plus a JPEG sample at 1:4. The images below are ENLARGED BY 400%.





ORIGINAL IMAGE
JPEG2000
(compression 1:7)
JPEG - PS Level 8 "high"
(compression 1:7)
JPEG - PS Level 10 "maximum"
(compression 1:4)

This is getting more interesting now because compression levels of 1:6 or 1:7 are widely used in digital cameras. It is already quite hard to spot any image degradation in the original-sized images. Nonetheless you can easily notice some difference when enlarging some critical image portions. Upon closer observation there's still a very slight difference between the original and the compressed JPEG2000 variant.  Looking at the sky the JPEG2000 compression has a smoothening effect which is in fact positive in this context. All critical details remain intact. On the other hand the compressed JPEG picture is still introducing some quite strong halo artifacts again though there're no color shifts anymore. The quality is probably less than what can be considered acceptable as "near lossless".  Even at the further reduced compression level of 1:4  the image cannot match the 1:7 compressed JPEG2000 variant.

JPEG2000 vs TIFF

Thanks to its 48bit color mode JPEG2000 is also serious competitor for the ancient but still wide-spread TIFF format.

I did a short test with a large image file (5443x3636 pixel,  16bit color depth):

TIFF 116 MB
TIFF with LZW compression 150 MB (which proves that LZW is ineffective for image compression)
JPEG2000 - lossless 61 MB
JPEG2000 - 100% quality (lossy mode) 21 MB
PSD (native Photoshop)
116 MB

Assuming that the JPEG2000 implementations will stabilize soon it is quite obvious that TIFF may not be the primary choice for image archiving much longer. If needed you can convert from JPEG2000 back to TIFF anyway.

References:

For technical background information about JPEG2000 you may have a look at the JPEG2000 FAQ at http://www.jpeg.org.

Disclosure: When you click on links to various merchants on this site and make a purchase, this can result in this site earning a commission. Affiliate programs and affiliations include, but are not limited to, the eBay Partner Network and Google Adsense.