diff --git a/QuickLook.Plugin/QuickLook.Plugin.ImageViewer/AnimatedImage/Providers/APngProvider.cs b/QuickLook.Plugin/QuickLook.Plugin.ImageViewer/AnimatedImage/Providers/APngProvider.cs
index 8b57652..9445838 100644
--- a/QuickLook.Plugin/QuickLook.Plugin.ImageViewer/AnimatedImage/Providers/APngProvider.cs
+++ b/QuickLook.Plugin/QuickLook.Plugin.ImageViewer/AnimatedImage/Providers/APngProvider.cs
@@ -258,3 +258,21 @@ internal class APngProvider : AnimationProvider
}
}
}
+
+file static class FrameExtension
+{
+ public static BitmapSource GetBitmapSource(this Frame frame)
+ {
+ using MemoryStream stream = frame.GetStream();
+
+ var bitmapImage = new BitmapImage();
+ bitmapImage.BeginInit();
+ bitmapImage.CacheOption = BitmapCacheOption.OnLoad;
+ bitmapImage.StreamSource = stream;
+ bitmapImage.EndInit();
+ bitmapImage.StreamSource = null;
+ bitmapImage.Freeze();
+
+ return bitmapImage;
+ }
+}
diff --git a/QuickLook.Plugin/QuickLook.Plugin.ImageViewer/LibAPNG.dll b/QuickLook.Plugin/QuickLook.Plugin.ImageViewer/LibAPNG.dll
deleted file mode 100644
index 94e0fa7..0000000
Binary files a/QuickLook.Plugin/QuickLook.Plugin.ImageViewer/LibAPNG.dll and /dev/null differ
diff --git a/QuickLook.Plugin/QuickLook.Plugin.ImageViewer/LibAPNG.xml b/QuickLook.Plugin/QuickLook.Plugin.ImageViewer/LibAPNG.xml
deleted file mode 100644
index 04c1aa8..0000000
--- a/QuickLook.Plugin/QuickLook.Plugin.ImageViewer/LibAPNG.xml
+++ /dev/null
@@ -1,176 +0,0 @@
-
-
-
- LibAPNG
-
-
-
-
- Sequence number of the animation chunk, starting from 0
-
-
-
-
- Width of the following frame
-
-
-
-
- Height of the following frame
-
-
-
-
- X position at which to render the following frame
-
-
-
-
- Y position at which to render the following frame
-
-
-
-
- Frame delay fraction numerator
-
-
-
-
- Frame delay fraction denominator
-
-
-
-
- Type of frame area disposal to be done after rendering this frame
-
-
-
-
- Type of frame area rendering for this frame
-
-
-
-
- Indicate whether the file is a simple PNG.
-
-
-
-
- Indicate whether the default image is part of the animation
-
-
-
-
- Gets the base image.
- If IsSimplePNG = True, returns the only image;
- if False, returns the default image
-
-
-
-
- Gets the frame array.
- If IsSimplePNG = True, returns empty
-
-
-
-
- Gets the IHDR Chunk
-
-
-
-
- Gets the acTL Chunk
-
-
-
-
- Get raw data of the chunk
-
-
-
-
- Modify the ChunkData part.
-
-
-
-
- Modify the ChunkData part.
-
-
-
-
- Convert big-endian to little-endian or reserve
-
-
-
-
- Convert big-endian to little-endian or reserve
-
-
-
-
- Convert big-endian to little-endian or reserve
-
-
-
-
- Convert big-endian to little-endian or reserve
-
-
-
-
- Convert big-endian to little-endian or reserve
-
-
-
-
- Compare two byte array
-
-
-
-
- Describe a single frame.
-
-
-
-
- Gets or Sets the acTL chunk
-
-
-
-
- Gets or Sets the fcTL chunk
-
-
-
-
- Gets or Sets the IEND chunk
-
-
-
-
- Gets or Sets the other chunks
-
-
-
-
- Gets or Sets the IDAT chunks
-
-
-
-
- Add an Chunk to end end of existing list.
-
-
-
-
- Add an IDAT Chunk to end end of existing list.
-
-
-
-
- Gets the frame as PNG FileStream.
-
-
-
-
diff --git a/QuickLook.Plugin/QuickLook.Plugin.ImageViewer/QuickLook.Plugin.ImageViewer.csproj b/QuickLook.Plugin/QuickLook.Plugin.ImageViewer/QuickLook.Plugin.ImageViewer.csproj
index 7866081..a55870a 100644
--- a/QuickLook.Plugin/QuickLook.Plugin.ImageViewer/QuickLook.Plugin.ImageViewer.csproj
+++ b/QuickLook.Plugin/QuickLook.Plugin.ImageViewer/QuickLook.Plugin.ImageViewer.csproj
@@ -100,6 +100,9 @@
all
+
+ all
+
@@ -109,9 +112,6 @@
-
- .\LibAPNG.dll
-