private static String getExtensionFromFile(File file) {
		String name = file.getName();
		int extPos = name.lastIndexOf('.');
		if (extPos < 0) {
			return "png";
		}
		return name.substring(extPos);

	}
An action to save the image from a NavigableImagePanel to a file.
<p>
The user is asked to provide a file to save the image to.
<p>
This class uses the ImageIO library to write the image to a file;
the image format is determined by filename extension -- PNG, GIF and JPG extensions are 
recognized and honored, other extensions are ignored, and the file is written in PNG 
format. Image transparency is honored when possible.

@see javax.imageio.ImageIO
Ghidra/Framework/Docking/src/main/java/docking/widgets/imagepanel/actions/SaveImageAction.java