| Generate a JPEG image |
|
|
|
|
ASPX.CS C# - How to generate dinamically a image protected void Page_Load(object sender, EventArgs e) { // create a Graphics object Bitmap bmp = new Bitmap(745, 570); Graphics g = Graphics.FromImage(bmp); // now draw on the Graphics object SolidBrush b = new SolidBrush(Color.FromArgb(191, 191, 191)); g.FillRectangle(b, new Rectangle(0, 0, bmp.Width, bmp.Height)); // send the image as response bmp.Save(Response.OutputStream, ImageFormat.Jpeg); }
Only registered users can write comments. Powered by AkoComment 2.0.3! |
||
| Last Updated ( Friday, 27 October 2006 ) | ||
| < Prev | Next > |
|---|




Articles 




