super(exportActionProperty);
}
public void actionPerformed(ActionEvent e) {
Dialog sd = new Dialog();
String fileName = sd.getImageFileNameFromDialog(viewer, null, imageType,
imageChoices, imageExtensions, qualityJPG, qualityPNG);
if (fileName == null)
return;
qualityJPG = sd.getQuality("JPG");
qualityPNG = sd.getQuality("PNG");
String sType = imageType = sd.getType();
if (sType == null) {
// file type changer was not touched
sType = fileName;
int i = sType.lastIndexOf(".");
if (i < 0)
return; // make no assumptions - require a type by extension
sType = sType.substring(i + 1).toUpperCase();
}
Logger.info((String) viewer.createImage(fileName, sType, null, sd.getQuality(sType), 0, 0));
}