Due to the current gap in continued funding from the U.S. National Science Foundation (NSF), the NSF Unidata Program Center has temporarily paused most operations. See NSF Unidata Pause in Most Operations for details.
Hi Andres, > I`m tryng to save a visad display in gif format. when i make: > > Display d; > ... > d.getImage(); > > shows me an exception like: > > Exception occurred during event dispatching: > visad.VisADError: cannot call getImage() from Thread: AWT-EventQueue-0 > at visad.DisplayImpl.getImage(DisplayImpl.java:1674) > at visad.DisplayImpl.getImage(DisplayImpl.java:1662) > at Formulario.Superficie2D.getImage(Superficie2D.java:125) > ... > And i don`t know why. > > can somebody send me an example? > how can i do this? You are probably calling getImage() from an AWT callback. You need to put the call, and the code that saves the result as a GIF file, into its own Thread. See the captureDialog() method around line 751 of visad/ss/FancySSCell.java for an example of putting code into a Thread. Cheers, Bill ---------------------------------------------------------- Bill Hibbard, SSEC, 1225 W. Dayton St., Madison, WI 53706 hibbard@xxxxxxxxxxxxxxxxx 608-263-4427 fax: 608-263-6738 http://www.ssec.wisc.edu/~billh/vis.html
visad
archives: