use native rotate method suggested by @dlemstra

This commit is contained in:
Paddy Xu
2017-08-04 22:05:52 +03:00
parent 810de851ff
commit e79de6c36d

View File

@@ -33,18 +33,7 @@ namespace QuickLook.Plugin.ImageViewer.AnimatedImage
using (var image = new MagickImage(path))
{
switch (image.Orientation)
{
case OrientationType.RightTop:
image.Rotate(90);
break;
case OrientationType.BottomRight:
image.Rotate(180);
break;
case OrientationType.LeftBotom:
image.Rotate(270);
break;
}
image.AutoOrient();
animator.KeyFrames.Add(new DiscreteObjectKeyFrame(image.ToBitmapSource(), TimeSpan.Zero));
animator.Duration = Duration.Forever;