9 Replies Latest reply on Dec 7, 2012 1:29 PM by RAFAEL IZAKOV

# relation between pixels and file size

I received one photo by e-m and movedt it to IPhoto. The property: 4928 x 3264, 4.1MB, JPEC. to calculate MB I did 4928 x 3264 x 8 x 3 = 386MB

4928, 3264 is number of pixels, 8 is number of bits and 3 is number of channels.

Way it is different: 4.1 & 386

What is wrong??

Next I open the photo in PSE9 and read image size: Pixel dimention W - 4928, H -  3264, (same when above), but file 46M. On my understanding it is  46MB (megabytes)

Also this photo had Document size (I mean it is print size) W 16.426inc and H 19.88inc with resolution 300.

Again diferences in file size.

Who can explain how calculated file?

What Is wrong?

Message was edited by: RAFAEL IZAKOV

• ###### 1. Re: relation between pixels and file size

There is nothing wrong. Let me explain it to you

your image is 4928x3264= 16084992 pixels. For each pixel you need 3 byte of data (one for each RGB channel). That makes to 48254976Bytes =47124KB =46MB

This is the image size that would have required if your image wasn't compressed. That is why PSE shows the image size as 46MB

But since jpeg uses lossy compression techniques, the algorithm for which is decided during creation of the file, the actual file size of the image reduces considerably. I created a blank new document of the size you said, and saved it as jpeg with low quality (0) to shrink it to 186KB. If you save your document in some format which doesn't compresses the image data, it should come up to 46MB

And again since the resolution of the file is 300pixels per inch (ppi), it would make 4928/300=16.426 inch and 3264/300=10.88 inch

Hope it solves your query

• ###### 2. Re: relation between pixels and file size

In iphoto if you look at the file size by clicking the info button, I'm sure it won't be 386 MB. Computers would need massively large hard drives if image files averaged that large.

• ###### 3. Re: relation between pixels and file size

Dear,

Thanks for explanation,

In front of me other GENERAL explanation what I fount on Forum several years ago.

Also it from Document size: Pixels dimention W 2800, H 1900,  File 15.2 M.

The Person name Tai Lao explaned 15.2 M coming from 2800 x 1900 x 8 x 3, where  8 is # of bits and 3 is # of channels.

Way you missed # of bits?

Thanks, Rafael

• ###### 4. Re: relation between pixels and file size

Multiplying the # of bit would give you the file size in bits. I simply used Bytes for calculating the file size.Since 1 Byte=8bits, I simply avoided the hassle to multiply and then devide by 8

• ###### 5. Re: relation between pixels and file size

Let me explain it to you this way:

Each pixel is composed of 3 channels. Each channel for JPEG range is 0-255. Thus for saving each channel we need log2 256 bits =8 bits = 1 Byte.

Thus for saving each pixel in a non compressed state, you would typically need 3 Byte of space.

thus a 4928x3264= 16084992 pixel would need 4928x3264x3= 48254976 Bytes

• ###### 6. Re: relation between pixels and file size

And also please check 2800 x 1900 x 8 x 3=127680000bits.

127680000bits=127680000/8=15960000 Bytes=15960000/1024=15585.93 KB=15585.93/1024=15.22MB

Thus the calculation was first done in bits and then converted to Bytes

• ###### 7. Re: relation between pixels and file size

Dear Barbara,

What is wrong in my calculation:

I received one photo by e-m and movedt it to IPhoto. The property: 4928 x 3264, 4.1MB, JPEC. to calculate MB I did 4928 x 3264 x 8 x 3 = 386MB

4928, 3264 is number of pixels, 8 is number of bits and 3 is number of channels.

Way it is different: 4.1 & 386

What is wrong??

• ###### 8. Re: relation between pixels and file size

Dear,

Please explain in detail how :

In e-m same # of pixels  but file 4.1MB?

Also please  give me time to understand your explanation

• ###### 9. Re: relation between pixels and file size

Dear Barbara,

now it is clear for me how calculeted 46MB.

The number 386MB was wrong.

Way in E-M the file 4.1MB for same number of pixels.?

How calculeted 4.1MB?