File Size of Saved Bitmaps

Hello everyone,

In my raytracing code, I can save images taken from another viewpoint. I used Bitmap.Save method to save them. Everything is good and I can save the images successfully. Here is an example of my output,


First image has:
Width: 802
Height: 802
Horizontal Resolution: 96 dpi
Vertical Resolution: 96 dpi
Bit Depth : 32
File Size : 1.493.909 bytes
File Size on Disk: 1.495.040 bytes

Second image has:
Width: 802
Height: 802
Horizontal Resolution: 96 dpi
Vertical Resolution: 96 dpi
Bit Depth : 32
File Size
File Size : 1.504.630 bytes
File Size on Disk: 1.507.328 bytes

As you see, images which have same properties have not the same file size. I wonder why? I didnt use any compressing technique, I just used Bitmap.Save method. Does it automatically compressing bmp files? I dont think so.

Thanks for all replies.
closed account (z05DSL3A)
I think it depends on what Bitmap you are talking about, I see nothing about the platform that you are using but it is probably using run length encoding (RLE).
Ok, I have changed my question.

I want to save these images without any compression. I would want to have images which have 802x802x4 = 2,572,816 byte. How can I do it?
closed account (z05DSL3A)
You would have to check the documentation for the Bitmap class that you are using.

I get 2.572.870 bytes as a result. Very close to the 2,572,816. I think the difference is just because of header file. Thank you for your kind help.
Topic archived. No new replies allowed.