export chart in png format into Response.OutputStream
Posted: Tue Jul 26, 2005 2:15 am
I have an asp.net application
when i export WebChart image in jpeg format into response.OutputStream
it works fine
but when i'm trying to export WebChart image in png format into response.OutputStream
I receive error
"A generic error occurred in GDI+."
also when I export image not in Response.OutputStream but in a file
it works fine in both cases: with JPEG format and PNG format
thank you
when i export WebChart image in jpeg format into response.OutputStream
it works fine
Code: Select all
private void Button1_Click(object sender, System.EventArgs e)
{
webChart.Chart.Export.Image.JPEG.Save(System.Web.HttpContext.Current.Response.OutputStream);
}
Code: Select all
private void Button1_Click(object sender, System.EventArgs e)
{
webChart.Chart.Export.Image.PNG.Save(System.Web.HttpContext.Current.Response.OutputStream);
}
"A generic error occurred in GDI+."
also when I export image not in Response.OutputStream but in a file
it works fine in both cases: with JPEG format and PNG format
thank you