0,
(int) d.getWidth(),
(int) d.getHeight(),
BufferedImage.TYPE_INT_ARGB);
ImageFormatter formatter = new AcmeGifFormatter();
byte[] imageBytes = formatter.formatImage(bi);
String newFileName = FileUtils.getFilePathToSaveFromUser("Create File To Save");
if (newFileName != null) {
FileOutputStream fos = new FileOutputStream(newFileName);
fos.write(imageBytes);
fos.flush();