This library supports impressive number of file formats so I was wondering is there way to check if file is supported before opening.
For example in a thumbnail viewer application what is be best way to check before attempting to to open as image? Should I
For example in a thumbnail viewer application what is be best way to check before attempting to to open as image? Should I
- just wrap it in try/catch,
- should I list all (extension == "jpg" || extension=="png"... and unintentionally maybe miss a few
- or is there something like bool b =isSupported("jpg")?