ExifOrientationMode enumeration

Applies to Windows and Windows Phone

Specifies the EXIF orientation flag behavior when obtaining pixel data.

Syntax


var value = Windows.Graphics.Imaging.ExifOrientationMode.ignoreExifOrientation;

Attributes

[Version(0x06020000)]

Members

The ExifOrientationMode enumeration has these members.

MemberValueDescription
IgnoreExifOrientation | ignoreExifOrientation0

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

RespectExifOrientation | respectExifOrientation1

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.

Requirements

Minimum supported client

Windows 8

Minimum supported server

Windows Server 2012

Minimum supported phone

Windows Phone 8.1 [Windows Phone Silverlight 8.1 and Windows Runtime apps]

Namespace

Windows.Graphics.Imaging
Windows::Graphics::Imaging [C++]

Metadata

Windows.winmd

See also

GetPixelDataAsync

 

 

Show:
© 2014 Microsoft