DrawString on Bitmap

  • Thread starter Thread starter Frecklefoot
  • Start date Start date
F

Frecklefoot

I have a Bitmap image on which I want to render a string. I know about the
GDI+ DrawString() method, but I need a Graphics reference to use it. I
couldn't find any function to get the Bitmap's Graphics reference. Is there
another way to do this?

TIA!
 
Frecklefoot said:
I have a Bitmap image on which I want to render a string. I know about the
GDI+ DrawString() method, but I need a Graphics reference to use it. I
couldn't find any function to get the Bitmap's Graphics reference. Is there
another way to do this?

TIA!

Bitmap myBitmap = new Bitmap(@"C:\Documents and
Settings\Joe\Pics\myPic.bmp");
Graphics g = Graphics.FromImage(myBitmap);

Erik
 
Back
Top