MATLAB: Monochromatic image with 256 gray levels

256 gray levelgray level imageheader of the imageImage Processing Toolboxmonochromatic

Hello everyone, Assuming a monochrome image with 1024 × 1024 pixels and 256 gray levels, I would like to calculate the total file size (in bytes), assuming a header (containing basic information, such as width and height of the image) of 32 bytes and w/o compression. Can you please help me on this? I have a doubt how to look at the header information on a gray scale image. Thanks

Best Answer

The question seems to be trivial. The header has 32 bytes, 256 gray-scales can be store in a UINT8, which is a byte. So you get a file size of:
1024 * 1024 + 32 = 1'048'608 bytes
I do not see, where your doubts about looking at the header play a role for this question.