using modified exiv2-ql (QL-Win/exiv2@cf560437bb) to detect Exif; switch from NConvert to Magick.NET

This commit is contained in:
Paddy Xu
2020-05-01 19:02:15 +03:00
parent 208c5d5391
commit b98f8e5ec6
36 changed files with 400 additions and 5612 deletions

View File

@@ -37,7 +37,7 @@ namespace QuickLook.Plugin.ImageViewer.AnimatedImage
private int _lastEffectivePreviousPreviousFrameIndex;
private NativeImageProvider _nativeImageProvider;
public APngAnimationProvider(string path, NConvert meta) : base(path, meta)
public APngAnimationProvider(string path, MetaProvider meta) : base(path, meta)
{
if (!IsAnimatedPng(path))
{
@@ -68,12 +68,18 @@ namespace QuickLook.Plugin.ImageViewer.AnimatedImage
}
}
public override Task<BitmapSource> GetThumbnail(Size size, Size fullSize)
public override Task<BitmapSource> GetThumbnail(Size renderSize)
{
if (_nativeImageProvider != null)
return _nativeImageProvider.GetThumbnail(size, fullSize);
return _nativeImageProvider.GetThumbnail(renderSize);
return new Task<BitmapSource>(() => _baseFrame.GetBitmapSource());
return new Task<BitmapSource>(() =>
{
var bs = _baseFrame.GetBitmapSource();
bs.Freeze();
return bs;
});
}
public override Task<BitmapSource> GetRenderedFrame(int index)