This page addresses the question: "If we are prepared to accept a given loss of image quality, how do the file sizes of JPEG, JPEG 2000, and HD Photo, compare?".
For any given set of quality values, the HD Photo and JPEG 2000 files were about the same size, and significantly smaller than the JPEG file.
The method used here was to generate a TIFF file, derive various compressed files from it, then to examine the differences between the histograms of the TIFF file and those derived from it. I do not know how reliably this predicts perceived image quality. So while this may contribute to an understanding of how good HD Photo's compression is, it can only be part of the story. I've provided some image extracts to allow others to make their own judgment.
(The tests used an early Beta version of the HD Photo Photoshop plug-in, not the one released on 17/18 August 2007. Two comparisons between the earliy and the latest versions have shown identical results for the same value of "Quality", so the tests remain valid).
For various JPEG "Quality" values, this table shows the file sizes of the JPEG itself, and of JPEG 2000 and HD Photo files which appear to have similar "quality values" when their histograms are compared. There are three such quality values, see next paragraph, and they don't vary consistently, so a judgment was needed about the best match. The quality values and file sizes almost certainly depend on the original image, so there is little to be gained from examining detailed differences.
The Mean, Std Dev, and Median, also called "quality values" in the table below, come from Photoshop's histograms, (see Details later), and are measures of aspects of loss of image quality compared with the 16-bit TIFF file from which all the compressed files were generated. "0" means "no loss", while larger values mean greater loss. (Caution: Photoshop's histogram statistics are designed for 256 levels, and with 16-bit images there may be variations within the "0" level that won't show in the statistics).
Four Photoshop (PSD) files can downloaded so that a visual rather than a statistical comparison can be made. Caution: they range in size from about 1.3 MB to about 2.7 MB.
They hold 600 x 400 pixel extracts from the 4992 x 3328 pixel images used throughout these tests. These extracts are all from precisely the same place in the original image, so it is easy to do on-screen comparisons. These files were all converted from 16-bit to 8-bit immediately before uploading, to make them faster to download. That shouldn't make any detectable difference to what can be seen on-screen.
- extract_original.psd: This is an extract from the original 16-bit TIFF file from which all other image files used in this tests were derived. I've made it a separate file to avoid including it as a layer in each of the files below, but it is intended to be copied as a separate layer into each of the image files below for comparison purposes.
- extract_comparison_12.psd: This has three layers, corresponding to the HD Photo, JPEG 2000, and JPEG files summarised in the table above for "JPEG quality = 12".
- extract_comparison_07.psd: This has three layers, corresponding to the HD Photo, JPEG 2000, and JPEG files summarised in the table above for "JPEG quality = 7".
- extract_comparison_02.psd: This has two layers, corresponding to the HD Photo and JPEG files summarised in the table above for "JPEG quality = 2".
My subjective conclusion, from comparing (on-screen) the original images (and these extracts), is that even when HD Photo and JPEG have similar histogram statistics, the JPEG images have nastier artefacts. This means that HD Photo could typically be compressed a little more than the above table would suggest and still compete with JPEG.
All image files were derived from the same uncropped CR2 raw file. This was opened in ACR 4.1 then opened in 16-bit mode in Photoshop CS3. It was converted to sRGB colour space for all subsequent tests, and a 16-bit TIFF was saved for all the following tests.
HD Photo comparisons
The 16-bit TIFF was "Saved As ... HD Photo" many times, using the "Basic Settings" with values of "Quality" from 0 to 1.
Each of these derived HD Photo files in turn was opened and copied as the 2nd layer to that same 16-bit TIFF. The "Blending mode" of the copied layer was set to "Difference".
Screen shots were made of the resultant histograms for each "Difference", and are shown in the table below. (The results for "Quality" values higher than 0.7 are not shown, because, like 0.7 itself, they all showed no apparent loss).
JPEG 2000 comparisons
The 16-bit TIFF was "Saved As ... JPEG2000 " many times, with values of "Quality" from 001 to 100.
Each of these derived JPEG2000 files in turn was opened and copied as the 2nd layer to that same 16-bit TIFF. The "Blending mode" of the copied layer was set to "Difference".
Screen shots were made of the resultant histograms for each "Difference", and are shown in the table below. (The results for "Quality" values higher than 040 are not shown, because, like 040 itself, they all showed no apparent loss).
An 8-bit TIFF was derived from the 16-bit TIFF, and the 8-bit TIFF was "Saved As ... JPEG" 13 times, with values of "Quality" of: 0, 1 .... 11, 12.
Each of these derived JPEG files in turn was opened, converted to 16-bits, and copied as the 2nd layer to the 16-bit TIFF. The "Blending mode" of the copied layer was set to "Difference".
Screen shots were made of the resultant histograms for each "Difference", and are shown in the table below. (JPEG Quality values of 0 and 1 are not shown in the Results table above, because neither JPEG 2000 nor HD Photo could be degraded to those JPEG image qualities!)
Each of these is a histogram of the "Difference" (blending mode) between a 16-bit TIFF file and a file derived from it by some form of lossy compression.
Original file sizes
A CR2 (from a Canon IDs Mark II at ISO 100, about 16 MP) was 17.6 MB. (A DNG from that was 14.8 MB). These sizes are significant - use of JPEG XR in-camera would surely be expected to be significantly less than these sizes?
The 16-bit TIFF (uncompressed) was 97 MB. The 8-bit TIFF (uncompressed) was 48 MB.