341342343344345346347348349350351
} catch (InterruptedException e) { DialogUtil.error(e); } // Encode the painted image as a GIF, sending to output stream GifEncoder encoder = new GifEncoder(newImage, out); encoder.encode(); // Close the output stream out.close(); }