I'm drawing an image and outputing it to web page using the following code:
Bitmap image = new Bitmap(350, 350);
Graphics g = Graphics.FromImage(image);
// code using g to draw image here
image.Save(Response.OutputStream, System.Drawing.Imaging.ImageFormat.Gif);
This works fine. Now I'd like to add a some text to the output (javascript). However, when I do* either the text isn't displayed or image comes out as garbage.
What's the proper way to do it?
(*- I changed the contenttype and used reponse.write. Also tried writing a byte array of text to the outputstream.)