determing file size of Bitmap object without saving it...

  • Thread starter Thread starter buu
  • Start date Start date
B

buu

how could I find file size of an bitmap object downloaded from an web site
without saving it to the disk (and using system.io.FileInfo)?

is there any way to create some kind of an byte array and read it's size?
 
I'm not sure I understand your question. You can look at the width,
height, and pixel format of a bitmap object to figure out the
approximate size that the bitmap would have when saved (assuming that
the bitmap is saved without compression). If you need to get the size
as it's being received, you can see how a bitmap is stored by googling
these words: bitmap storage msdn. The headers will tell you the size
of the bitmap.
 
Back
Top