Hi to all! As the title says, how can generate (and display) images on the fly for simple charting, resizing etc?
Thanks
Hi to all! As the title says, how can generate (and display) images on the fly for simple charting, resizing etc?
Thanks
Use System.Drawing namespace.
Add a reference to System.Drawing assembly. Create a new Bitmap class. Call CreateGraphics on it. Use the returned Graphics object to do your drawing. Set the Response.ContentType to the appropriate image MIME type. Finally save the Bitmap to the Response.Output stream.
Check the caution about System.Drawing and ASP.NET http://msdn.microsoft.com/en-us/library/system.drawing.aspx If I were doing it now, I'd use WPF http://www.codeproject.com/KB/WPF/WPF-Image-to-WebPage.aspx