Reducing no.of colors in BuffereImage

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

Reducing no.of colors in BuffereImage

Post by Madhavi » Fri May 10, 2002 11:37 am

Hi there!
I need Pie charts in gif format. I tried to convert into Gif Using Acme library. But I am getting an error which reads: Too many colors for a Gif.
Is there any way I can reduce no.of colors used in BufferedImage to 216.
Any ideas?? Or can U give me a code snippet which does the above functionality??
Thanks in advance
- Madhavi

David Gilbert

Re: Reducing no.of colors in BuffereImage

Post by David Gilbert » Fri May 10, 2002 11:43 am

If you use PNG rather than GIF, then you won't have this problem.

Regards,

DG.

Madhavi

Re: Reducing no.of colors in BuffereImage

Post by Madhavi » Fri May 10, 2002 2:16 pm

Thanks for the tip! The image in PNG format looks much more clearer.

regards,
Madhavi

Locked