Skip to main content
Inspiring
May 29, 2023
Answered

Convert Pixel Dimensions to Image File Size

  • May 29, 2023
  • 4 replies
  • 2985 views

When I bring up an image file in PS v. 24.5, the file sie is not displayed, only the image width and height in pixels.

 

Wodering if there is an algorithm/formula for converting pixel dimensions to file size??

 

Best, jwc

This topic has been closed for replies.
Correct answer Conrad_C

Yes, using a desktop window view that displays the file size next to the file name in the macOS Finder (or in Windows, Explorer) really is the best way. Because what you see in the Finder is the file size that does account for the specific file format, and any compression applied.

 

Just be aware that as you edit in Photoshop, the file size display on the desktop doesn’t update until Photoshop completes the next time you use the Save command.

4 replies

Nancy OShea
Community Expert
May 29, 2023
quote

Wondering if there is an algorithm/formula for converting pixel dimensions to file size??

By @Jack

===========

Document size depends on other factors besides just height x width.  See screenshot.

 

Nancy O'Shea— Product User & Community Expert
Bojan Živković11378569
Community Expert
May 29, 2023
quote

 

Wodering if there is an algorithm/formula for converting pixel dimensions to file size??

 

Best, jwc


By @Jack


No, toooo many variables to make such conversion. How many layers? What is on layers? How many Smart Objects from that layers? How many bits per chanel, how many channels..........

 

If you are looking at status bar and pixel dimensions are displayed just click on right pointing triangle to see list then choose what you want displayed.

Also Window > Info can show you many useful information. Click on Info panel menu then choose Panel Options and check what you want to see diaplayed.

 

JackAuthor
Inspiring
May 29, 2023
Thanks. In the meantime, I found that in m iMac, when the image is saved, it can thenc examined with Apple's ‘Finder’ app, where file size is displayed alongside the file name. ...
Zesty_wanderlust15A7
Known Participant
May 29, 2023

Surely you also have a view where you can see all details immediately and are not just looking at icons. There are options for that.

Conrad_C
Community Expert
May 29, 2023

You can monitor file size in multiple places in Photoshop, Jane-e’s question is in that direction. And yes, there is a very simple formula for calculating file size.

 

But there is a catch that affects both of those things, and I’ll get to that in a moment.

 

The formula is independent of Photoshop, so you can find the formula itself on the web, and it works the same for any image editing application.

The basic file size equals:

Number of pixels * bits per pixel * number of channels

 

For example, suppose you have a digital camera image that is 6000 × 4000 pixels.

6000 * 4000 = 24,000,000 pixels (24 megapixels).

It is saved at 16 bits per pixel, so 24 million * 16 = 384 million.

There are three channels, so 384 million * 3 = 1,152,000,000.

That is the file size in bits.

There are 8 bits to a byte, and 1000 bytes in a megabyte, so 1,152,000,000 bytes equals about 144 megabytes (MB).

 

So the “pure” file size of a 6000 × 4000 pixel image, at 16 bits per channel RGB, is 144MB.

You will get exactly that file size if you save that image in TIFF format with no compression.

 

Now here is the catch: Your document will probably not be that exact file size. The actual file will often be a different size, for many reasons.

 

The file size can be much larger than that, if the image is saved with Photoshop layers, masks, Smart Objects, extra channels, etc.

 

The file size can be much smaller than that if it’s a camera raw image, because that is not yet demosaiced to RGB and may have been captured at a different bit depth in camera. The file size can also be smaller if it was saved in a format that uses lossless compression (such as Photoshop, TIFF with LZW or ZIP, PNG), and it can be much smaller if it uses lossy compression (JPEG), but lossy compression loses quality.

 

Change the file specs and the file size will also change. In the example above, if it’s saved at 8 bits per channel instead of 16 bpc, the pure file size is cut in half (72MB instead of 144MB).

jane-e
Community Expert
May 29, 2023

@Jack wrote:

When I bring up an image file in PS v. 24.5, the file sie is not displayed, only the image width and height in pixels.


 

 

Where are you looking?

 

  • Image > Image size?
  • Info panel?
  • Status bar?
  • Somewhere else?

 

Jane