public static ImageExportOptions read( XmlNode node )
throws XMLException
{
node = node.getChild( ExportOptionsTag );
final String typeName = node.getAttribute( TypeTag );
final ImageType type = ImageType.getImageTypeByName( typeName );
if ( type == null ) {
throw new XMLException( "Unrecognized image export type" );
}
final ImageExportOptions options = type.newExportOptions();
options.restore( node );
if ( node.hasAttribute( FileTag ) ) {
options.m_exportFile = new File( node.getAttribute( FileTag ) );
}
return options;