The answer to this is not specific to Photoshop; it’s related to how photo formats work in any photo application you might use.
You’re looking for one true file size, but what the replies are trying to explain is that the same file can have different sizes at different times, depending on many factors, such as whether the document is open or closed, its compression type, whether it has layers, its color mode and bits per pixel, and so on.
@warpigs666 wrote:
When I look at an image file (jpg, png) in finder it shows as 800kb, then when I open it in photoshop and look at image size it's 10mb. What the heck is going on?
The other replies are correct. When stored, it’s 800KB because the JPEG format compresses it for storage. But it cannot be edited compressed, so when you open it to edit, it must be expanded to 10MB…but that expansion happens only in working memory (RAM). Not in the saved document, which is why you don’t see the expansion in the document file size.
Think of one of those packable rain jackets or shopping bags, the ones you can stuff down into a little pocket-sized pouch. That small size makes them popular. But can you use them like that? No, they can’t function when compressed. If you want to actually use it as a jacket or a bag, you have to uncompress it up into its normal, true size, and then it’s useful. But not as small. It’s the same way with compressed images such as JPEG. If you want to edit a JPEG in any photo application (not just Photoshop), it must be expanded from its compressed storage size into its true size when it’s moved into working memory for editing. But you can compress it again when you’re done, to save storage space.
@beaur96732910 wrote:
So , what then is the real file size ? If I asked for scans that are 16 mb
That is a huge red flag, and one reason this is not being understood. Although it’s been traditional for many years to talk about scans as a certain number of megabytes, that practice has always been wrong in the big picture. Because file size is not a reliable indicator of the dimensions or resolution of an image.
All of the image specs below result in a roughly 16MB single layer uncompressed TIFF document (like a scan), because of the variables in the pixel math that davecm wrote about:
6 x 10 inches at 300 ppi, 8 bits per RGB channel
8 x 10 inches at 187 ppi, 16 bits per RGB channel
8.5 x 11 inches at 300 ppi, 16 bits in one grayscale channel
36 x 30 inches at 70 ppi, 8 bits per RGB channel
5 x 7 inches at 350 ppi, 8 bits per CMYK channel
In addition, all of the image specs below result in a 16MB single layer document because of the differences between formats and compression methods:
7.75 x 7.75 inches at 300 ppi, 8 bits per RGB channel, TIFF uncompressed format
18.5 x 18.5 inches at 300 ppi, 8 bits per RGB channel, TIFF format with LZW compression
22 x 22 inches at 300 ppi, 8 bits per RGB channel, TIFF format with ZIP compression
59 x 59 inches at 300 ppi, 8 bits per RGB channel, JPEG format at compression level 10
(actual file sizes depend on the image content)
Because the same file size can be arrived at by many combinations of specs — some of which you might not want — shops should never have been using file size as a measure of a scan, despite tradition. When a shop says “we provide 16MB scans,” you need to ask at what ppi, color mode, bit depth, format, and (if used) compression. Because the answers can radically change what you get in that 16MB, as shown above.
A “16MB scan” did have a more reliable meaning back in the 1990s when everybody made 8 bits/channel TIFF scans in CMYK or grayscale for print. But in the last 20 years, workflows shifted more toward 16 bits/channel, to RGB for cross-media work, and more use of compression, so you could no longer assume what a 16MB scan was made of. That’s how talking about scans by file size became an unreliable measure.
@beaur96732910 wrote:
And what type of interpolation is happening to my image file ?
No interpolation. It’s only being compressed for storage and expanded for editing, as described. The compression depends on what kind of compression, and if it’s lossy compression, what degree was applied.