What's new
Photoshop Gurus Forum

Welcome to Photoshop Gurus forum. Register a free account today to become a member! It's completely free. Once signed in, you'll enjoy an ad-free experience and be able to participate on this site by adding your own topics and posts, as well as connect with other members through your own private inbox!

Interesting question, maybe.


lenny109

New Member
Messages
4
Likes
0
Hi,
I would love an answer to this question. Both a short one that I can understand and a long one so that I can confuse a friend with science.

I have a picture from my camera and it is a JPG of about 2MB. As soon as I make any ajustments to it (colour, perspective etc) the file size jumps right up to 25MB. Why?
Cheers
Lenny
 
Hi lenny109

Before I attempt an answer let me ask two leading questions. What is the pixel size of the file? My guess would be about 3000 x 4000 pixels. Secondly, in which file format are you saving the 25mb file. PSD?

BTW, welcome to the forums.
 
Yep you are right on both counts.

I realise that by resaving the file as a JPG I will get the file size down again to a much smaller size.

I don't have a problem I am just curious to know what effects the picture size so much.

Cheers
Lenny
 
I am not a techinical guru but...

JPEG - Joint Photographic Experts Group
The JPEG image is compressed and depending on the quality setting on your camera the compression will be higher or lower. High compression = Low quality.
http://www.faqs.org/faqs/jpeg-faq/part1/

The PSD format is non-compressed and also stores all your selections, paths, channels etc. So the PSD format isn't a good choice if you just want to store your image. If you don't want to compress your images you could choose BMP or TIFF.

If you want to enhance your images always use the PSD format as a working copy. This will ensure that all your selections etc is there for you in the future.

/Moltas
 
Hi again, lenny109,

Moltas provided the answer. I'll add a slightly technical desccription which won't be perfectly accurate but a give you a good idea without being too dense.

When a JPEG is saved, the image is first analyzed in 8 x8 pixel blocks. The upper left pixel is written in code while the rest of the block is written in a simpler code in relation to that reference pixel. This shrinks the file size. The greater the compression, the closer to the 'same as the upper left pixel' is how the file is written and the image becomes cruder as more data is thrown away. In it's worst case, which is never used, all 64 pixels in each 8 x 8 pixel block become the same. As soon as you can see the blocks of pixels in an image they are called artifacts. The fact of throwing away pixel data in the JPEG compression scheme makes the file smaller but because data is lost the technique is called lossy vs. a lossless file compression scheme in which no data is lost.

When you save a PSD file each and every pixel is written in the file, location, transparency, color. Each layer you add increases the file size, as does each channel and everything else needed to be written into the file. On top of that, there is now saved a composite image which is a flattened image. That boosts your file size tremendously but is necessary, we are told for old versions of Photoshop compatibility.

Actually it is necessary because .psd used to be Photoshop's proprietary file type. They allowed other applications to use their file type but most of them only can read flattened files, not the full .psd. In order for those applications to be able to read your .psd files, the flattened (composite) must be part of it.

Recently we had a fascinating (well to me it was ;) ) discussion on saving your image files in .psd files vs. the .tif layered format which allows for one of two lossless compression schemes, LZW and ZIP. You might find it interesting.

http://photoshopgurus.com/forum/viewtopic.php?t=6632

I should add that you mentioned resaving your file as a JPEG. Generally that is a bad idea. Each time you resave a file as a JPEG it degrades as more pixel data is thrown away. You should save your original JPEGs separately but when you are working on a file save it in the .psd format or .tif with layers, channels, etc. A TIF with LZW or ZIP compression will save the same data as a .psd file but will be considerably smaller than the .psd.

Cheers!
 
Thanks very much for the comprehensive reply's.

So a file that has been lightned a little would save at 25mb (just an example) but a file that had been lightned and restored a little and maybe stretched but still only working on the original layer could then be 65mb? It all depends on how much it gets edited? Why can a single layered image be so different? isn't the image still using the same amount of pixels of the same size?
Cheers
Lenny
 
If you just have one layer there will be very little file size difference no matter how much work you do on it.
 
I've also noted that those file sizes in the bottom of the PS screen are kind of like Enron's books, inflated. I often start with a 10 meg raw file and open to 25 or so in PSD then by the time I've worked the image a while the funny number at the bottom of the screen will say 1.5 or more GIG. If I save it, Exploer seldom will show even 1 gig.

Sorry I don't know why.
 
Hi Robt,
Your working on files that get to 1GB! That seems rather large, especially as it is only relatively recently that we have had HD's that size.
What did you do 5 years ago?
Lenny
 
robt,

What specific data are you looking at in the Information bar? Scratch Sizes, Document Sizes? Bringing a 10mb RAW file into PS translates to a 25mb file PS easily (in fact that seems on the small side) but to get a 1gb file out of that you need to be increasing the image size dramatically and adding a zillion layers, I'd think. Can you tell us more info about a typical file (pixel size, layers, bit depth etc) and we can tell you what you are seeing.

lenny109,

Serious users of PS have always had to push the limits of technological advance. Five years ago a 40gb hard drive was large, 10 to 20 gb pretty normal. We were using PS5.5 (I think). Maybe PS 6 was on the horizon. Very few people worked wit files which were 1gb or better. A gigabyte of RAM was huge. At the time a 100mb file was pretty large.

In a single layer image the document size is read by PS as the pixel dimensions times the bit depth. So if you are working with an 8 bit file you multiply the pixel width x pixel height x 24. If you are working with 16 bit files you multiply by 48. Divide that figure by 1024 and you get the approximate file size of a flattened image.However there is some PSD overhead added to create a file so the number above isn't a precise figure for the file size that Explorer or Get Info is reporting.

When you are working on a file the working file size reflects every layer, channel, History state (all those Undos add up big time), snapshots, etc. Photoshop can basically use all the memory you can throw at it and then a dedicated scratch disk, not your boot disk, is advisable for keeping the program happily humming along.
 
lenny109

So a file that has been lightned a little would save at 25mb (just an example) but a file that had been lightned and restored a little and maybe stretched but still only working on the original layer could then be 65mb?

What is important to understand is, that a file that is saved as a jpeg is smaller than the same file saved as a psd file, but when you open that jpeg in Photoshop it reverts back to a psd file.

All open files in Photoshop are basically psd's. If you don't resave as a jpeg you won't gain much in file size, even though you have previously compressed the file by saving in the jpeg format.

Sark
 
Sark said:
All open files in Photoshop are basically psd's. If you don't resave as a jpeg you won't gain much in file size, even though you have previously compressed the file by saving in the jpeg format.

However, If you do resave as a JPEG you are losing data on every resave. Your best bet is to save as a TIFF (with layers and channels if needed) and use either LZW or ZIP compression. Your net file size will be about 1/2 - 3/5's of the native PSD format and still contain all the same data.
 
What confuses some people, is the difference between an open image and an image file. A jpeg may be 2mb stored as an image file, but when it is an open image displayed on your screen, even displayed in a browser, its size increases considerably.

You can test this by opening a jpeg with Task Manager open, and watching how much the Memory usage jumps. On my system a 2mb jpeg uses about 20mb of Ram when opened in a browser and 26mb opened in Photoshop.

For a single layer image, and assuming the Photoshop colour mode is consistent. Image size, in pixels, determines memory usage when a file is open in Photoshop.

If you open an image in Photoshop, and save it as a psd and, as a jpeg. When both files are re-opened in Photoshop, they will be the same size.

If you now save them both as psd?s, the jpeg version will be only slightly smaller (due to the image being less complex, caused by the earlier jpeg compression). When a psd file is saved, the complexity of the image has an effect on stored file size.

Also, if you were to save the jpeg version as a jpeg again, the image would become even less complex, losing more and more information every time it was opened and saved as a jpeg. Hence, the reason this should be avoided.

As Welles suggests, if you?re going to work on a jpeg image over a number of sessions in Photoshop, save it as a psd (or layered tiff) each time. When you?re finished editing, only then should you save back to jpeg.

Sark
 

Back
Top