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 All, I have a grid created and i want to save it to the file which is of either *.gif or *.jpeg format and then open it when required. I have created a grid on canvas which is added to the JDialog. I want to save it either in *.gif or *.jpeg format. I tried to do something like this. public void convertGridToImage() { BufferedImage image = display.getImage(); try { JPEGEncodeParam param = JPEGCodec.getDefaultJPEGEncodeParam(image); param.setQuality(1.0f, true); FileOutputStream fout = new FileOutputStream("c:/newtry.gif"); JPEGImageEncoder encoder JPEGCodec.createJPEGEncoder(fout); encoder.encode(image, param); fout.close(); } catch (NoClassDefFoundError err) { throw new VisADException("JPEG codec not found"); } } it gives the exception at this place display.getImage(); I checked the captureImage() method in BasicSSCell class, but these examples are too complicated for a person who is still learning VisAD. Is there any easy way to approach ? Please suggest. Regards, Karan Kapoor. __________________________________________________ Do You Yahoo!? Get email alerts & NEW webcam video instant messaging with Yahoo! Messenger http://im.yahoo.com
visad
archives: