views:

160

answers:

3

Hi to all! As the title says, how can generate (and display) images on the fly for simple charting, resizing etc?

Thanks

+3  A: 

For charting, you may want to look into the ASP.NET Chart Control.

http://weblogs.asp.net/scottgu/archive/2008/11/24/new-asp-net-charting-control-lt-asp-chart-runat-quot-server-quot-gt.aspx

theG
+3  A: 

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.

Mehrdad Afshari
+1  A: 

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