Replace supported image extension list with image detection via MagickImageInfo. (#818)

* Replace supported image extension list with image detection via MagickImageInfo.

* Change ImageViewer priority to -4.
Change VideoViewer priority to -3 and detect audio/video via MediaInfo instead of file extensions.

* Make mediaInfo a class static and initialize once.
Add some notes about MediaInfo Open and Close.

* Remove try/catch from Prepare and let it be handled in caller.
If there was an exception due to MediaInfo it would have already occurred in CanHandle.

* Upgrade ImageMagick to latest

* Only check extension for well known image and animated image types.
For other image formats, let ImageMagick try to detect by file content.
Upgrade to latest Magick.NET

Co-authored-by: Frank Becker <frank.becker@thoughtexchange.com>
This commit is contained in:
Frank Becker
2021-05-14 10:07:32 -07:00
committed by GitHub
parent 885b3ed53f
commit 3ef980bb17
5 changed files with 81 additions and 61 deletions

View File

@@ -62,14 +62,14 @@
<Reference Include="LibAPNG">
<HintPath>.\LibAPNG.dll</HintPath>
</Reference>
<Reference Include="Magick.NET-Q8-AnyCPU, Version=7.20.0.0, Culture=neutral, PublicKeyToken=2004825badfa91ec, processorArchitecture=MSIL">
<HintPath>..\..\packages\Magick.NET-Q8-AnyCPU.7.20.0.1\lib\net40\Magick.NET-Q8-AnyCPU.dll</HintPath>
<Reference Include="Magick.NET-Q8-AnyCPU, Version=7.23.4.0, Culture=neutral, PublicKeyToken=2004825badfa91ec, processorArchitecture=MSIL">
<HintPath>..\..\packages\Magick.NET-Q8-AnyCPU.7.23.4\lib\net40\Magick.NET-Q8-AnyCPU.dll</HintPath>
</Reference>
<Reference Include="Magick.NET.Core, Version=3.0.0.0, Culture=neutral, PublicKeyToken=2004825badfa91ec, processorArchitecture=MSIL">
<HintPath>..\..\packages\Magick.NET.Core.3.0.0\lib\net40\Magick.NET.Core.dll</HintPath>
<Reference Include="Magick.NET.Core, Version=6.2.0.0, Culture=neutral, PublicKeyToken=2004825badfa91ec, processorArchitecture=MSIL">
<HintPath>..\..\packages\Magick.NET.Core.6.2.0\lib\net40\Magick.NET.Core.dll</HintPath>
</Reference>
<Reference Include="Magick.NET.SystemWindowsMedia, Version=1.0.2.0, Culture=neutral, PublicKeyToken=2004825badfa91ec, processorArchitecture=MSIL">
<HintPath>..\..\packages\Magick.NET.SystemWindowsMedia.1.0.2\lib\net40\Magick.NET.SystemWindowsMedia.dll</HintPath>
<Reference Include="Magick.NET.SystemWindowsMedia, Version=3.0.9.0, Culture=neutral, PublicKeyToken=2004825badfa91ec, processorArchitecture=MSIL">
<HintPath>..\..\packages\Magick.NET.SystemWindowsMedia.3.0.9\lib\net40\Magick.NET.SystemWindowsMedia.dll</HintPath>
</Reference>
<Reference Include="PresentationCore" />
<Reference Include="PresentationFramework" />