mirror of
https://github.com/QL-Win/QuickLook.git
synced 2025-09-12 18:39:45 +00:00
better NConvert decoding
This commit is contained in:
@@ -49,13 +49,12 @@ namespace QuickLook.Plugin.ImageViewer.AnimatedImage
|
||||
img.BeginInit();
|
||||
img.UriSource = new Uri(Path);
|
||||
img.CacheOption = BitmapCacheOption.OnLoad;
|
||||
img.DecodePixelWidth = (int) decodeWidth;
|
||||
img.DecodePixelHeight =
|
||||
(int) decodeHeight; // specific size to avoid .net's double to int conversion
|
||||
img.DecodePixelWidth = decodeWidth;
|
||||
img.DecodePixelHeight = decodeHeight; // specific size to avoid .net's double to int conversion
|
||||
img.EndInit();
|
||||
|
||||
var scaled = new TransformedBitmap(img,
|
||||
new ScaleTransform(fullSize.Width / decodeWidth, fullSize.Height / decodeHeight));
|
||||
new ScaleTransform(fullSize.Width / img.PixelWidth, fullSize.Height / img.PixelHeight));
|
||||
scaled.Freeze();
|
||||
return scaled;
|
||||
}
|
||||
|
Reference in New Issue
Block a user