private static MagickFormat GetMagickFormatForFileExtension(string fileExtension) { MagickFormat?key = ImageMagickUtilities.GetMagickFormatFromFileExtension(fileExtension.ToLowerInvariant()); if (!key.HasValue) { throw new UnsupportedFileFormatException(); } return(key.Value); }
private static IFileFormat GetImageFormatFromMagickFormat(MagickFormat magickFormat) { string ext = ImageMagickUtilities.GetFileExtensionFromMagickFormat(magickFormat); if (string.IsNullOrEmpty(ext)) { throw new UnsupportedFileFormatException(); } return(FileFormat.FromFileExtension(ext)); }
private static IFileFormat GetImageFormatFromMagickFormat(MagickFormat magickFormat) { string ext = ImageMagickUtilities.GetFileExtensionFromMagickFormat(magickFormat); if (string.IsNullOrEmpty(ext)) { throw new FileFormatException(IO.Properties.ExceptionMessages.UnsupportedFileFormat); } return(FileFormatFactory.Default.FromFileExtension(ext)); }