/* (non-Javadoc)
* @see ca.eandb.jmist.framework.Display#finish()
*/
public void finish() {
HostService service = JdcpUtil.getHostService();
try {
int width = image.rows();
int height = image.columns();
BufferedImage bi = new BufferedImage(width, height,
BufferedImage.TYPE_INT_RGB);
FileOutputStream os = (service != null) ? service
.createFileOutputStream(fileName) : new FileOutputStream(
fileName);
String formatName = FileUtil.getExtension(fileName);
if (formatName.equals("")) {