When previewing file size in photoshop (Image > Image Size), I see a different size from what shows when the JPG is then saved on my machine. Please see example below. Does anyone know why this is happening please?
Photoshop - 3MB
This very images saved on laptop - 596 KB
Image size shows file size in RAM so 1276 x 823 x 3 = 315044 = 3.0MB ( There are 1048576 bytes in a MB)
That is different to the saved file size on disk, after lossy jpeg compression which compresses the file to 596KB.
Thanks for the answer. Sorry if I'm asking silly questions, but what does the 3 in '1276 x 823 x 3' stand for? The 1276 and 823 are height and width in pixels, but I'd need help wrapping my head around that last componenet of the equasion 😄
The three is three bytes, one for each RGB colour in an 8 bits/channel image. If the document was 16 bits/channel it would be two bytes per colour, so x 6.
As Dave says.
When you open a jpeg, it is decompressed back to its full native size as above. When open, it doesn't have a file format at all. File formats are storage containers.
The jpeg compression - packaging for storage - is incredibly effective. It can shrink a file down to 1 - 5% of native size (!). This massive size reduction comes at a steep price, however. Jpeg compression is destructive and cumulative. When you open it, it is not exactly the same as when you saved it. Some data are lost, some artifacts introduced. Don't resave a jpeg if you can avoid it.
Thank you for further explanation @D Fosse and @davescm!
I definitely didn't realise RGB was represented by its own separate bytes - so definitely learnt something new here 🙂
One last thing I'd like to ask is - there's no way to check/ preview the file's size other than saving and looking at the saved image's size it appears?
'..there's no way to check/ preview the file's size other than saving and looking at the saved image's size it appears?'
It depends on the format to which you save. For PSD and TIFF then you do not get a preview of the file size. If saving to jpeg then teh Save dialogue gives an idea of file size as you alter the quality (i.e. compression) control.