I have build a page graph.aspx, which streams a chart to other pages. That is, other pages include it with img tags and set the img src="graph.aspx?config=blah". I accomplished this using the suggested modification from another thread:
Public Class InheritedWebChart
Inherits C1.Web.C1WebChart.C1WebChart
Public Function MyGetImage(ByVal ImgFormat As Imaging.ImageFormat) As System.Drawing.Image
' get size from the base class
' assuming that width/height are in pixels
Dim sz As Size = New Size(Width.Value, Height.Value)
Return GetImage(ImgFormat, sz)
End Function
End Class
However, when I try to output to anything other than jpeg, I just get a red X and no image. This is (hopefully) the relevant code:
Dim img As System.Drawing.Image = chrtSOL.MyGetImage(System.Drawing.Imaging.ImageFormat.Png)
Response.ContentType = "image/png"
img.Save(Response.OutputStream, System.Drawing.Imaging.ImageFormat.Png)
Again, if I change those Pngs to Jpgs, it works. I also tried this: I hard coded the MyGetImage reference to PNG and it gave me a JPG anyway!
My C1WebChart dll reports its version as 1.0.20052.15115.
Any ideas?