mirror of
https://github.com/QL-Win/QuickLook.git
synced 2025-09-11 17:59:17 +00:00
use native rotate method suggested by @dlemstra
This commit is contained in:
@@ -33,18 +33,7 @@ namespace QuickLook.Plugin.ImageViewer.AnimatedImage
|
|||||||
|
|
||||||
using (var image = new MagickImage(path))
|
using (var image = new MagickImage(path))
|
||||||
{
|
{
|
||||||
switch (image.Orientation)
|
image.AutoOrient();
|
||||||
{
|
|
||||||
case OrientationType.RightTop:
|
|
||||||
image.Rotate(90);
|
|
||||||
break;
|
|
||||||
case OrientationType.BottomRight:
|
|
||||||
image.Rotate(180);
|
|
||||||
break;
|
|
||||||
case OrientationType.LeftBotom:
|
|
||||||
image.Rotate(270);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
animator.KeyFrames.Add(new DiscreteObjectKeyFrame(image.ToBitmapSource(), TimeSpan.Zero));
|
animator.KeyFrames.Add(new DiscreteObjectKeyFrame(image.ToBitmapSource(), TimeSpan.Zero));
|
||||||
animator.Duration = Duration.Forever;
|
animator.Duration = Duration.Forever;
|
||||||
|
Reference in New Issue
Block a user