Skip to content

Commit eb4f34f

Browse files
Fix Anchor position for TopRight
1 parent 72d128b commit eb4f34f

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

src/ImageSharp.Web/Processors/ResizeWebProcessor.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -285,8 +285,8 @@ T L
285285
AnchorPositionMode.TopRight => orientation switch
286286
{
287287
ExifOrientationMode.TopRight or ExifOrientationMode.RightTop => AnchorPositionMode.TopLeft,
288-
ExifOrientationMode.BottomRight or ExifOrientationMode.LeftBottom => AnchorPositionMode.BottomRight,
289-
ExifOrientationMode.BottomLeft or ExifOrientationMode.LeftTop => AnchorPositionMode.BottomLeft,
288+
ExifOrientationMode.BottomLeft or ExifOrientationMode.LeftBottom => AnchorPositionMode.BottomRight,
289+
ExifOrientationMode.BottomRight or ExifOrientationMode.LeftTop => AnchorPositionMode.BottomLeft,
290290
_ => anchor,
291291
},
292292
AnchorPositionMode.BottomRight => orientation switch

tests/ImageSharp.Web.Tests/Processors/ResizeWebProcessorTests.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -342,8 +342,8 @@ private static AnchorPositionMode GetExpectedAnchor(ushort orientation, AnchorPo
342342
AnchorPositionMode.TopRight => orientation switch
343343
{
344344
ExifOrientationMode.TopRight or ExifOrientationMode.RightTop => AnchorPositionMode.TopLeft,
345-
ExifOrientationMode.BottomRight or ExifOrientationMode.LeftBottom => AnchorPositionMode.BottomRight,
346-
ExifOrientationMode.BottomLeft or ExifOrientationMode.LeftTop => AnchorPositionMode.BottomLeft,
345+
ExifOrientationMode.BottomLeft or ExifOrientationMode.LeftBottom => AnchorPositionMode.BottomRight,
346+
ExifOrientationMode.BottomRight or ExifOrientationMode.LeftTop => AnchorPositionMode.BottomLeft,
347347
_ => anchor,
348348
},
349349
AnchorPositionMode.BottomRight => orientation switch

0 commit comments

Comments
 (0)