File Sizes Under Different File Formats


Should you use camera raw, psd, tiff, jpeg, or even a new image format HD Photo to store your images?  I did a little experiment with each of these formats to determine the size of file that each one produced. I saved the image on the right under all of the formats.  Where applicable I saved 16 bit images as well as 8 bit images.  Also where applicable I saved the images using different compression levels.  The original image was from a Canon 30D which produces an 8.2 megapixel image.  The resulting file sizes are given in the table below.

One might well wonder why there is such a broad difference in file sizes.  At least a portion of the answer to that question is the concept of lossy vs. lossless compression.  All of these formats are compressed somewhat.  But some such as Camera Raw, PSD, TIFF, and HD Photo use a lossless compression method.  What this means is that when files using these formats are brought back into the computer each pixel is just like it was when the file was saved.  Not one pixel was lost -- hence the format is lossless.  What this means to the user is that the file can be save then reopened as many times as you wish without losing any of the quality of the image.  But it also means that the resulting size of the image file is larger than with lossy methods.

On the other hand, JPEG and some settings on HD Photo uses a lossy compression method that allows a greater degree of compression by combining pixels that are "almost" the same.  And each of these two methods allows for different quality settings.  The higher quality settings have a tighter definition of what "almost" is and results in fewer pixels being combined.  And also results in larger files.  Under any quality, but especially the lower quality settings, repeated saving and reloading a file will result in a significant lowering of the quality of an image.  But low quality settings are very good for displaying an image on a computer screen.  For example, the image above was saved using a low quality setting for jpeg.  But for printing and for storing you will want a higher quality setting.

Another major factor that goes into the file size is the number of bits per pixel.  For every camera, even point-and-shoots, the image is a 12 bit image.  And since the camera raw format is actually a monochrome format, this is 12 bits (1.5 bytes) per pixel.  Without compression this would be a little over 12 megabytes for my Canon 30D camera.  Compression gets it down to less than 8 megabytes.  But for an 8 bit color image that is actually 8 bits for each of the three colors (red, green, and blue) that becomes 24 bits (3 bytes) per pixel.  So my 8.2 megapixel image becomes 24.6 megabytes.  And the PSD format is very close to that.  But to get even more quality many people move up to 16 bit color.  And this is 16 bits per color or 48 bits (6 bytes) per pixel.  And my 8.2  mp image becomes a 49.2 megabyte file which, again, is about what it is in the PSD format.

But if you notice by the chart you can get very good quality JPEG 8 bit images for about 4.5 megabytes in a file, about 20% of the uncompressed file.  And 10% of the uncompressed 16 bit file.  And that is pretty much what your printer will print.

On the new HD Photo format:  Microsoft has announced a new compression format called HD Photo that is claimed to be of higher quality than other formats.  Ron Stein sent me the following link where you can get more information about this new format.  Click here for more information.    I downloaded the plugin for photoshop and tried it.  The filesizes are listed in the table below.  It is not at this time ready for prime time.  I started to wonder when the lowest quality got me a file size of one third the size of the best jpeg.  But I found out why.  The colors on the resulting file were wildly off.  The sky turned green and purple in places.  And it also would not save the Photoshop layers.  But it probably will be better when the real thing comes out.  It currently is out only in a beta version.

Al

File Sizes for an 8.2 Megapixel Image

File Format
16 bit images
8 bit images
Camera Raw (12 bit image)
7,866 KB
n.a.
PSD, no layers
47, 195 KB
23, 799 KB
PSD, layers
87, 140 KB
48, 099 KB
TIFF, no compression
55,980 KB
32,000 KB
TIFF,  LZW
66,199 KB
23,980 KB
TIFF, ZIP
50,469 KB
20,408 KB
TIFF, ZIP, Layers
136,929 KB
56,483 KB
JPEG, High quality (10)
n.a.
4,470 KB
JPEG, Medium quality (5)
n.a.
1,350 KB
JPEG, Low quality (3)
n.a.
954 KB
JPEG, Very low quality (1)
n.a.
681 KB
HD Photo, lossless
36,842 KB
13,539 KB
HD Photo, High quality
26,469 KB
5,877 KB
HD, Photo, Medium quality
12,743 KB
1,395 KB
HD, Photo, Low quality
2,691 KB
203 KB