Generate the chart as GIF format

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

Generate the chart as GIF format

Post by Moshea » Tue Jan 07, 2003 3:27 am

Hiya

Just wondering if I could output the chart as GIF format? If so, what is the library call for it? I could only find JPEG one and SVG... but not GIF.

Thanks.

Moshea

David Gilbert

Re: Generate the chart as GIF format

Post by David Gilbert » Tue Jan 07, 2003 11:19 am

Hi Moshea,

There's no GIF encoder included with JFreeChart, but that doesn't mean that you can't use one from somewhere else.

I prefer the PNG format though since it performs a similar job to GIF, has technical advantages (better color support for one), and isn't subject to patent restrictions in the way GIF is.

But if you have a GIF encoder, it shouldn't be hard to get JFreeChart to work with it...the ChartUtilities class contains code that makes use of JPEG and PNG encoders, the code is going to be pretty similar for other image encoders.

Regards,

DG

Locked