public static IImageMetadata extractMetadata(File file) {
		IImageMetadata metadata = null;

		try {
			metadata = Sanselan.getMetadata(file);
		} catch (ImageReadException e) {
			Log.getLogger().log(Level.WARNING, "Failed to read metadata from file " + file, e);
		} 
		catch (IOException e) {
			Log.getLogger().log(Level.WARNING, "Failed to read metadata from file " + file, e);
		}

		return metadata;
	}