NOTICE: This version of the NSF Unidata web site (archive.unidata.ucar.edu) is no longer being updated.
Current content can be found at unidata.ucar.edu.
To learn about what's going on, see About the Archive Site.
tom Amaral wrote:
Please, I need help on the following problem. I would like to create a gif file from a visad display. I am using the code below but it does not work. Thanks for any help. Runnable captureImage = new Runnable() {public void run() { Image img = display.getImage(); Graphics g =img.getGraphics();g.drawImage(img, 0,0, null); try{ File filee = new File("file.gif"); OutputStream output = new BufferedOutputStream(new FileOutputStream(filee)); GIFEncoder encoder = new GIFEncoder(img); encoder.Write(output); } catch (Exception w){ } } }Thread t = new Thread(captureImage);t.start();
-- Tom Whittaker (tomw@xxxxxxxxxxxxx) University of Wisconsin-Madison Space Science and Engineering Center Cooperative Institute for Meteorological Satellite Studies Phone/VoiceMail: 608.262.2759
visad
archives: