Skip to content
Discussion options

You must be logged in to vote

You could check if the extension can be found in MagickFormat. But if you want to check if the format can be read you will need to use MagickNET.SupportedFormats. Maybe something like this:

MagickNET.SupportedFormats
    .Any(format => format.IsReadable &&
         format.Format.ToString().Equals(extension.Substring(1), StringComparison.OrdinalIgnoreCase));

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by ChuckSavage
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Help
Labels
None yet
2 participants