has anyone used JPEGImageEncoder successfuly?

Has anyone successfully used JPEGImageEncoder to create
JPEG files from BufferedImages, such as those returned
by DisplayImpl.getImage()?

The following code:

      OutputStream stream
        new FileOutputStream("jpeg_file");
      JPEGImageEncoder encoder = JPEGCodec.createJPEGEncoder(stream);
      BufferedImage image = display.getImage(true);

hangs in the call to encoder.encode().

Bill Hibbard, SSEC, 1225 W. Dayton St., Madison, WI  53706
hibbard@xxxxxxxxxxxxxxxxx  608-263-4427  fax: 608-263-6738

  • 1999 messages navigation, sorted by:
    1. Thread
    2. Subject
    3. Author
    4. Date
    5. ↑ Table Of Contents
  • Search the visad archives: