public static File showSaveFile(final Shell parent,final File workingDir){
  final JFileImageChooser chooser=new JFileImageChooser(parent,SWT.SAVE,workingDir);
  chooser.setFilter(supportedWriters);
  final FileDialog dialog=chooser.getFileDialog();
  dialog.setText("Save image");
  final String path=dialog.open();
  File file=null;
  if (path != null && path.length() >= 1) {
    file=new File(path);
  }
  return file;
}

public static File showSaveFile ( final Shell parent , final File workingDir ) { final JFileImageChooser chooser = new JFileImageChooser ( parent , SWT . SAVE , workingDir ) ; chooser . setFilter ( supportedWriters ) ; final FileDialog dialog = chooser . getFileDialog ( ) ; dialog . setText ( "Save image" ) ; final String path = dialog . open ( ) ; File file = null ; if ( path != null && path . length ( ) >= 1 ) { file = new File ( path ) ; } return file ; }
display a dialog to choose a file name to save an image to
