J
Jeff
hi
asp.net 2.0
I'm experimenting with GDI+ in asp.net and get an "A generic error occurred
in GDI+." exception.
Below is my code, I've marked a line with "<<<<-- here". It's here the
exception is thrown.
(test.FileBytes - FileBytes is an array of bytes) test is an enity class,
and I'm storing the images in the database. When tested the image which
test.FileBytes is based on is a GIF
MemoryStream ms = new MemoryStream(test.FileBytes);
System.Drawing.Image image = System.Drawing.Image.FromStream(ms);
Bitmap img = new Bitmap(new Bitmap(image));
Font font = new Font("Verdana", 12);
Graphics gfx = Graphics.FromImage(img);
gfx.DrawString("Hello World", font, Brushes.CadetBlue, 50, 50);
img.Save(ms, ImageFormat.Bmp); <<<<-- here
ms.WriteTo(Response.OutputStream);
any suggestions?
asp.net 2.0
I'm experimenting with GDI+ in asp.net and get an "A generic error occurred
in GDI+." exception.
Below is my code, I've marked a line with "<<<<-- here". It's here the
exception is thrown.
(test.FileBytes - FileBytes is an array of bytes) test is an enity class,
and I'm storing the images in the database. When tested the image which
test.FileBytes is based on is a GIF
MemoryStream ms = new MemoryStream(test.FileBytes);
System.Drawing.Image image = System.Drawing.Image.FromStream(ms);
Bitmap img = new Bitmap(new Bitmap(image));
Font font = new Font("Verdana", 12);
Graphics gfx = Graphics.FromImage(img);
gfx.DrawString("Hello World", font, Brushes.CadetBlue, 50, 50);
img.Save(ms, ImageFormat.Bmp); <<<<-- here
ms.WriteTo(Response.OutputStream);
any suggestions?