Table of Contents

Class ExifOrientationUtilities

Namespace
SixLabors.ImageSharp.Web
Assembly
SixLabors.ImageSharp.Web.dll

Contains various helper methods for working with EXIF orientation values.

public static class ExifOrientationUtilities
Inheritance
ExifOrientationUtilities
Inherited Members

Methods

IsExifOrientationRotated(ushort)

Returns a value indicating whether an EXIF orientation is rotated (not flipped).

public static bool IsExifOrientationRotated(ushort orientation)

Parameters

orientation ushort

The EXIF orientation.

Returns

bool

true if the orientation value indicates rotation; otherwise false.

Transform(AnchorPositionMode, ushort)

Transforms the specified anchor value depending on the specified orientation.

public static AnchorPositionMode Transform(AnchorPositionMode anchor, ushort orientation)

Parameters

anchor AnchorPositionMode

The input anchor value.

orientation ushort

The EXIF orientation.

Returns

AnchorPositionMode

The transformed anchor.

Transform(Size, ushort)

Transforms the specified size value depending on the specified orientation.

public static Size Transform(Size size, ushort orientation)

Parameters

size Size

The input size value.

orientation ushort

The EXIF orientation.

Returns

Size

The transformed size.

Transform(Vector2, Vector2, Vector2, ushort)

Transforms the specified vector value depending on the specified orientation.

public static Vector2 Transform(Vector2 position, Vector2 min, Vector2 max, ushort orientation)

Parameters

position Vector2

The input vector value.

min Vector2

The minimum bounds of the area of interest.

max Vector2

The maximum bounds of the area of interest.

orientation ushort

The EXIF orientation.

Returns

Vector2

The transformed vector.