let WPF do the decoding

This commit is contained in:
Paddy Xu
2017-08-01 23:28:58 +03:00
parent 67cc8aa480
commit 94a18707dd

View File

@@ -33,7 +33,7 @@ namespace QuickLook.Plugin.ImageViewer.AnimatedImage
if (decoder.IsSimplePNG)
{
animator.KeyFrames.Add(
new DiscreteObjectKeyFrame(decoder.DefaultImage.GetBitmapSource(), TimeSpan.Zero));
new DiscreteObjectKeyFrame(BitmapFrame.Create(new Uri(path)), TimeSpan.Zero));
animator.Duration = Duration.Forever;
return;
}