public void write(Image i, int which, File f) throws IOException
public void write(BufferedImage i, int which, File f) throws IOException
   public void write(Image i, int which, File f) throws IOException   {      if (!available)      {         return;      }      try      {         System.err.println(which + " " + subTypes[which]);         QTSession.open();         int width = i.getWidth(null);         int height = i.getHeight(null);         Frame frame = new Frame();         QTCanvas canvas = new QTCanvas();         canvas.setVisible(false);         frame.add(canvas);         frame.addNotify();         QDGraphics offscreen = new QDGraphics(new QDRect(0, 0, width, height));         QTImageDrawer imageDrawer = new QTImageDrawer(i);         imageDrawer.setRedrawing(true);         canvas.setClient(imageDrawer, true);         imageDrawer.setGWorld(offscreen);         imageDrawer.redraw(null);         QTFile exportFile = new QTFile(f.toString());         GraphicsExporter ge = new GraphicsExporter(subTypes[which]);         ge.requestSettings();         ge.setInputPixmap(offscreen);         ge.setOutputFile(exportFile);         int size = ge.doExport();         QTSession.close();      }      catch (QTException e)      {         e.printStackTrace();      }      catch (Exception e)      {         e.printStackTrace();      }   }