How to merge multiple mages?

A discussion forum for JFreeChart (a 2D chart library for the Java platform).
Locked
gopinath
Posts: 12
Joined: Wed Feb 17, 2010 1:21 pm
antibot: No, of course not.

How to merge multiple mages?

Post by gopinath » Mon Apr 26, 2010 10:25 am

I have multiple charts of same size and I want to merge those into a single chart(image) and write into the output stream as single image.
Please help me in doing the task.
Thanks,
Gopi.

gengar
Posts: 26
Joined: Thu Mar 18, 2010 12:28 am
antibot: No, of course not.

Re: How to merge multiple mages?

Post by gengar » Mon Apr 26, 2010 7:16 pm

If your ChartPanels are inside a JPanel (or other containers in Swing), then you can get a BufferedImage from it using this method:
http://stackoverflow.com/questions/1349 ... l-to-image

You could also get a BufferedImage from the ChartPanel for each chart and join these images together as a larger BufferedImage according to their location.

Locked