Re: [jzy3d] java.lang.IllegalArgumentException when trying to screenshot

24 views
Skip to first unread message

Martin Pernollet

unread,
Oct 13, 2010, 6:00:48 PM10/13/10
to Jzy3d
Hi Deepak,

To create your screenshot, you must have the chart already displayed. So first:
ChartLauncher.openChart(chart, new Rectangle(0,0,600,600),"Test");
and then:
ImageIO.write(chart.screenshot(), "png", new File("d:/test2.png"));

If you want to do offscreen image generation, you have to dive into the - non-working - net.masagroup.jzy3d.plot3d.rendering.canvas.OffscreenCanvas
that relies on
GLDrawableFactory.getFactory().createGLPbuffer

Regards,
Martin 

2010/10/13 Deepak <connect...@gmail.com>
Hi Martin.

I tried to save the plot, but got following error


java.lang.IllegalArgumentException: im == null!
at javax.imageio.ImageIO.write(Unknown Source)
at javax.imageio.ImageIO.write(Unknown Source)
at com.uboc.rllfm.ui.test.TestSurface.getChart(TestSurface.java:106)
at com.uboc.rllfm.ui.test.TestSurface.<init>(TestSurface.java:40)
at com.uboc.rllfm.ui.test.TestSurface.main(TestSurface.java:56)

Please find attached source file. 

Regards. Deepak

On Wed, Oct 13, 2010 at 2:43 PM, Martin Pernollet <martin.p...@gmail.com> wrote:
Great, do not hesitate to send screenshots!

2010/10/13 Deepak <connect...@gmail.com>

Hi Martin,
 
Thanks alot to you and your team. Good Job .
 
My client is happy with the plot, he appreciated the work. But I'm still trying to make it better. If require I'll definitely bother you. :)
 
I'm expecting new version from JYZ team very soon. :)
 
Regards... Deepak



Reply all
Reply to author
Forward
0 new messages