ExifOrientationMode Enum

Definition

Specifies the EXIF orientation flag behavior when obtaining pixel data.

C#
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.Foundation.UniversalApiContract), 65536)]
public enum ExifOrientationMode
Inheritance
ExifOrientationMode
Attributes

Windows requirements

Device family
Windows 10 (introduced in 10.0.10240.0)
API contract
Windows.Foundation.UniversalApiContract (introduced in v1.0)

Fields

Name Value Description
IgnoreExifOrientation 0

The EXIF orientation flag is ignored. No rotation or flip operations are performed.

RespectExifOrientation 1

If the image frame contains a valid EXIF orientation flag, the specified rotation and/or flip operations are performed on the pixel data.

Remarks

Some image formats, including JPEG, TIFF, and JPEG-XR, support EXIF orientation metadata. This metadata specifies a flip and/or rotation operation that should be applied to the raw image data so it is oriented correctly. You can read the EXIF orientation metadata and apply the corresponding transform yourself, or you can use this enumeration to automatically determine and apply the correct transform.

If you specify RespectExifOrientation, the resulting orientation operation is combined with any flip and rotation operations that you have specified using BitmapTransform.

For example, you call BitmapDecoder.GetPixelDataAsync using RespectExifOrientation and a BitmapRotation value of Clockwise90Degrees, and the particular image being decoded has an EXIF orientation flag specifying a counterclockwise 90 degree rotation. In this example, the ExifOrientationMode and BitmapRotation options are added together for a net rotation of 180 degrees clockwise.

In addition, if you specify RespectExifOrientation along with a clip using BitmapTransform.Bounds, the bounding rectangle must take into account the change in coordinate space from the EXIF orientation operation. You can obtain the full image size after EXIF orientation is applied by using OrientedPixelWidth and OrientedPixelHeight.

Applies to

Ürün Sürümler
WinRT Build 10240, Build 10586, Build 14383, Build 15063, Build 16299, Build 17134, Build 17763, Build 18362, Build 19041, Build 20348, Build 22000, Build 22621, Build 26100

See also