mirror of
https://github.com/QL-Win/QuickLook.git
synced 2026-05-08 03:06:29 +08:00
Add DICOM image support to ImageViewer plugin #1866
This is not a permanent support and will be adjusted to the plugin later.
This commit is contained in:
@@ -26,7 +26,7 @@ using System.Xml;
|
||||
|
||||
namespace QuickLook.Plugin.ImageViewer;
|
||||
|
||||
public class MetaProvider
|
||||
public partial class MetaProvider
|
||||
{
|
||||
private readonly SortedDictionary<string, (string, string)> _cache = []; // [key, [label, value]]
|
||||
|
||||
@@ -79,6 +79,13 @@ public class MetaProvider
|
||||
if (int.TryParse(w_.Item2, out var w) && int.TryParse(h_.Item2, out var h))
|
||||
return new Size(w, h);
|
||||
|
||||
if (IsDicomFile(_path))
|
||||
{
|
||||
var dicomSize = TryGetDicomSize(_path);
|
||||
if (!dicomSize.IsEmpty)
|
||||
return dicomSize;
|
||||
}
|
||||
|
||||
// fallback
|
||||
try
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user