if (!path.endsWith(".png")) {
path = path.concat(".png");
}
File outFile = new File(path);
AbstractGump gump = previewCanvas.getGumpAt(0);
if (gump != null) {
BufferedImage img = (BufferedImage) gump.getImage();
try {
ImageIO.write(img, "png", outFile);
} catch (IOException e1) {
String msg = UOGumpViewer.getResourceBundle().getString(
"UOGumpViewer.Message.CouldNotSaveGump");