Add support for .kra and .cdr previews #1662

This commit is contained in:
ema
2025-07-05 04:58:24 +08:00
parent 63f516b504
commit 22e8838ce3
2 changed files with 69 additions and 0 deletions

View File

@@ -30,7 +30,9 @@ public class Plugin : IViewer
{
private static readonly HashSet<string> WellKnownImageExtensions = new(
[
".cdr", // CorelDraw
".fig", // Figma
".kra", // Krita
".xd", // AdobeXD
".xmind", // XMind
]);
@@ -65,6 +67,9 @@ public class Plugin : IViewer
_ = Task.Run(() =>
{
using Stream imageData = Handler.ViewImage(path);
if (imageData is null) return;
BitmapImage bitmap = imageData.ReadAsBitmapImage();
if (_ip is null) return;