Bitmap file size

  • Thread starter Thread starter Danny
  • Start date Start date
D

Danny

Hi all,

Is there a way for checking the file size of a Bitmap without saving
it to disk (using C#)?

Thanks in advance,
Danny
 
The file size will depend upon the format in which its saved.

For a bitmap that will be 40+4+14+(3*width*height) which is the size of the
bitmap headers and the color table.

For a JPEG or a GIF the size will depend upon the compression ratios.


--
--
Bob Powell [MVP]
Visual C#, System.Drawing

Ramuseco Limited .NET consulting
http://www.ramuseco.com

Find great Windows Forms articles in Windows Forms Tips and Tricks
http://www.bobpowell.net/tipstricks.htm

Answer those GDI+ questions with the GDI+ FAQ
http://www.bobpowell.net/faqmain.htm

All new articles provide code in C# and VB.NET.
Subscribe to the RSS feeds provided and never miss a new article.
 
Back
Top