I recently opened a jpeg and a tiff of the same subject in Photoshop CS3. They both were made with a Nikon D300, and both had a file size of almost 35mb. If I checked the image info it said the jpeg was about 4mb, which sounds normal. But, CS3 says different. I've tried different reformatted cards and my D200 as well. In Aperture2 the image file sizes are right at 4+MB for the jpeg and 35mb for the tiff. I've reset the preferences in CS3 and the file sizes are the same. The ppi resolution for both images are 300ppi. What am I missing? The first thing that alerted me was when CS3 was having to read the jpeg then rotating the image. This took about 20 seconds, something I never noticed before. I always thought that straight from the camera a fine large setting for a jpeg would be different from a tiff. Help explain this please.
The reason you got confused is that it's not the file size that is displayed in Photoshop.
Photoshop's status bar shows uncompressed size of image. With three 8-bit color channels, that's 3 bytes per pixel, resulting 34.9 MB for a 4288 x 2848 image from your camera. JPEG is a compressed format, so the actual file is smaller.
Showing compressed size would be complicated, as
Uncompressed size is useful as you'll know how much memory is currently used to hold the image and you can calculate how much compression, cropping and/or resizing you'll have to apply to reach desired file size.
|show 6 more comments|
Just in case it wasn't clear yet, let me put it another way:
TIFF and JPEG files are "containers" for image data. TIFF are often compressed losslessly — like a
However, when you go to display an image, the data gets reconstructed from the file into a simple bitmap: an array holding 8 bits per color × 3 colors × the image width × the image height. As an aside, it's possible to have other color depths, but don't worry about that just here. The point is, regardless of how you've stored them, the actual image unpacks to this collection of data, where the space required is simply based on the dimensions, not the content. This uncompressed image is what is displayed, and what you work with in photoshop.
Even though you initially compressed in a way that discards data, once rendered into viewable or editable form, the places for the image data are the same: still the same-sized buckets for storing information, and still the same number of them for the same image resolution. A flat-color solid black uncompressed image takes the same space as a very detailed photograph — even though there's more information in the detailed one, there's the same amount of data required for display and editing.
This has a key repercussion, which is that the compression is "lost". If you used a compression that keeps all the data (like that normally used by TIFF, PNG, or PSD), there's no real problem: if you save again, it's different, but still lossless. However, when you save again as JPEG, you go through the process of throwing out information all over again, meaning your image gets worse every time you re-save.
Many image editors try to recreate the compression parameters used in the original JPEG when re-saving, so that as long as you haven't changed the file much, the incremental loss is basically just rounding errors. However, if you've made a lot of changes across the image, that won't help.
In practice, you can resave a JPEG several times before there's anything you might notice even on fine inspection. But it's best to minimize the number.