Saving Bitmaps

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I'm trying to use GDI+ and C# to draw some text and then save to a bitmap
file. When I open a bmp file that I have saved it looks terrible. I have
tried playing with different settings but no matter what I do it looks like
the resolution is set very low. Is this the way it is or am I missing
something.
 
Here is the code that I use.

Brush b = new SolidBrush(Color.Black);
Font f = new Font("verdana", 10);
Bitmap bmp = new Bitmap(300,200);
Graphics g = Graphics.FromImage(bmp);
g.Clear(Color.White);
g.DrawString("hello world", f, b, new Point(10,10));
bmp.Save(@"C:\test.bmp", ImageFormat.Bmp);
g.Dispose();

When I open test.bmp it looks terrible. How do I make it so the saved bmp
is of acceptable quality.
 
I have played with the textrenderinghint settings with no luck. If you run
the simple code described earlier on your computer how does it look?
 
Back
Top