writeChartAsJPEG bug in 0.9.4?

A discussion forum for JFreeChart (a 2D chart library for the Java platform).
Locked
cmp

writeChartAsJPEG bug in 0.9.4?

Post by cmp » Fri Oct 25, 2002 3:08 am

Potential bug in 0.9.4 (I just upgraded)

The ChartUtilities.writeChartAsJPEG(out, chart, 600, 400, info); is having issues. I am writing my chart to a ServletOutputStream. It worked fine with 0.9.3 but the second I upgraded (both jars) it broke. No exceptions, just a broken image icon in IE.

So I switched my respone tyoe and used ChartUtilities.writeChartAsPNG(out, chart, 600, 400, info);. This worked fine.

Thanks.

By the way, this library is phenomenal

Dave Gilbert

Re: writeChartAsJPEG bug in 0.9.4?

Post by Dave Gilbert » Fri Oct 25, 2002 10:15 am

Oops...somehow in adding some new methods (to expose image quality settings via the API), the existing writeChartAsJPEG method became empty. It should look like this:

public static void writeChartAsJPEG(OutputStream out,
JFreeChart chart,
int width, int height,
ChartRenderingInfo info) throws IOException {

writeChartAsJPEG(out, DEFAULT_JPEG_QUALITY, chart, width, height, info);

}

Thanks for the report...

DG

Locked