mirror of
https://github.com/QL-Win/QuickLook.git
synced 2025-09-10 17:29:08 +00:00
do not rotate unless nessessary
This commit is contained in:
@@ -33,13 +33,18 @@ namespace QuickLook.Plugin.ImageViewer.AnimatedImage
|
||||
|
||||
using (var image = new MagickImage(path))
|
||||
{
|
||||
image.Rotate(image.Orientation == OrientationType.RightTop
|
||||
? 90
|
||||
: image.Orientation == OrientationType.BottomRight
|
||||
? 180
|
||||
: image.Orientation == OrientationType.LeftBotom
|
||||
? 270
|
||||
: 0);
|
||||
switch (image.Orientation)
|
||||
{
|
||||
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.Duration = Duration.Forever;
|
||||
|
Reference in New Issue
Block a user