Fix image viewer copy without transparency support

This commit is contained in:
ema
2024-12-30 05:22:58 +08:00
parent 4eb4251db5
commit 82987b0848
4 changed files with 70 additions and 3 deletions

View File

@@ -19,6 +19,7 @@ using QuickLook.Common.Annotations;
using QuickLook.Common.ExtensionMethods;
using QuickLook.Common.Helpers;
using QuickLook.Common.Plugin;
using QuickLook.Plugin.ImageViewer.NativeMethods;
using System;
using System.ComponentModel;
using System.Diagnostics;
@@ -293,13 +294,13 @@ public partial class ImagePanel : UserControl, INotifyPropertyChanged, IDisposab
{
if (_source is not null)
{
Clipboard.SetImage(_source);
ClipboardEx.SetClipboardImage(_source);
return;
}
if (viewPanelImage.Source is BitmapSource bitmapSource)
{
Clipboard.SetImage(bitmapSource);
ClipboardEx.SetClipboardImage(bitmapSource);
return;
}
}