Announcement

Collapse
No announcement yet.

File size discrepancy

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    File size discrepancy

    Hello everybody,

    I have a uncompressed bmp file. The resolution of this file is 800x800 and 24 bit.

    So, my file size should be (800x800x24)/8 = 1.920.000 + (54 byte for header file)
    That is ok and I have this file now.

    I have now grey scale image whose size is 400x400. It is 8 bit.

    File size should be (400x400x8)/8 = 160.000 +(header file)
    But now, it is 161.078. Why there is so much difference? Is it header file? I dont think so.
    Moreover, when I convert this 8 bit file to 24 bit, I got the same result(1.920.054) as previous calculation. What is the reason of this 1078 byte extra?

    Thanks in advance.

    #2
    You have to consider also the color palette, composed by 256 RGBQUAD; each RGBQUAD consists of 4 bytes, so the file size will be 160000 + 54 + 1024 = 161078 bytes.
    IrfanPaint developer
    The latest stable IrfanPaint version is the 0.4.13.70.
    IrfanPaint is now open-source (released under BSD license).

    Comment

    Working...
    X