Add EXR to ImageViewer

This commit is contained in:
Paddy Xu
2020-08-16 12:13:39 +02:00
parent 7fc6e03ffa
commit 41b42d81e9

View File

@@ -18,7 +18,6 @@
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.IO; using System.IO;
using System.Linq;
using System.Windows; using System.Windows;
using QuickLook.Common.Helpers; using QuickLook.Common.Helpers;
using QuickLook.Common.Plugin; using QuickLook.Common.Plugin;
@@ -28,18 +27,20 @@ namespace QuickLook.Plugin.ImageViewer
{ {
public class Plugin : IViewer public class Plugin : IViewer
{ {
private static readonly string[] Formats = private static readonly HashSet<string> Formats = new HashSet<string>(
{ new[]
// camera raw {
".ari", ".arw", ".bay", ".crw", ".cr2", ".cap", ".dcs", ".dcr", ".dng", ".drf", ".eip", ".erf", ".fff", // camera raw
".iiq", ".k25", ".kdc", ".mdc", ".mef", ".mos", ".mrw", ".nef", ".nrw", ".obm", ".orf", ".pef", ".ptx", ".ari", ".arw", ".bay", ".crw", ".cr2", ".cap", ".dcs", ".dcr", ".dng", ".drf", ".eip", ".erf", ".exr",
".pxn", ".r3d", ".raf", ".raw", ".rwl", ".rw2", ".rwz", ".sr2", ".srf", ".srw", ".x3f", ".fff", ".iiq", ".k25", ".kdc", ".mdc", ".mef", ".mos", ".mrw", ".nef", ".nrw", ".obm", ".orf", ".pef",
// normal ".ptx", ".pxn", ".r3d", ".raf", ".raw", ".rwl", ".rw2", ".rwz", ".sr2", ".srf", ".srw", ".x3f",
".bmp", ".hdr", ".heic", ".heif", ".ico", ".icon", ".jpg", ".jpeg", ".psd", ".wdp", ".tif", ".tiff", ".tga", // normal
".webp", ".pbm", ".pgm", ".ppm", ".pnm", ".svg", ".emf", ".wmf", ".bmp", ".hdr", ".heic", ".heif", ".ico", ".icon", ".jpg", ".jpeg", ".psd", ".wdp", ".tif", ".tiff",
// animated ".tga", ".webp", ".pbm", ".pgm", ".ppm", ".pnm", ".svg", ".emf", ".wmf",
".png", ".apng", ".gif" // animated
}; ".png", ".apng", ".gif"
});
private ImagePanel _ip; private ImagePanel _ip;
private MetaProvider _meta; private MetaProvider _meta;
@@ -63,7 +64,7 @@ namespace QuickLook.Plugin.ImageViewer
public bool CanHandle(string path) public bool CanHandle(string path)
{ {
return !Directory.Exists(path) && Formats.Any(path.ToLower().EndsWith); return !Directory.Exists(path) && Formats.Contains(Path.GetExtension(path.ToLower()));
} }
public void Prepare(string path, ContextObject context) public void Prepare(string path, ContextObject context)