BitmapTransform class

Applies to Windows and Windows Phone

Contains transformations that can be applied to pixel data.

Syntax


public sealed class BitmapTransform

Attributes

[MarshalingBehavior(Agile)]
[Version(0x06020000)]

Members

The BitmapTransform class has these types of members:

Constructors

The BitmapTransform class has these constructors.

ConstructorDescription
BitmapTransform Creates a new BitmapTransform object.

 

Methods

The BitmapTransform class inherits methods from the Object class (C#/VB/C++).

Properties

The BitmapTransform class has these properties.

PropertyAccess typeDescription

Bounds

Read/writeSpecifies the bounding rectangle that is used to crop the bitmap.

Flip

Read/writeSpecifies the flip operation that is used to transform the bitmap.

InterpolationMode

Read/writeSpecifies the interpolation mode that is used to scale the bitmap.

Rotation

Read/writeSpecifies the rotation operation that is used to transform the bitmap.

ScaledHeight

Read/writeSpecifies the height, in pixels, of the bitmap after it is scaled.

ScaledWidth

Read/writeSpecifies the width, in pixels, of the bitmap after it is scaled.

 

Remarks

The default values of BitmapTransform result in a pass-through operation.

T he order of operations is when setting multiple transform operations is:

  1. Scale
  2. Flip
  3. Rotation
  4. Crop

You should be careful to use the correct coordinate space when specifying each transform’s parameters. Scaling occurs before rotations and flips, and therefore you should specify ScaledWidth and ScaledHeight in the source image’s coordinate space. Cropping occurs after all other transforms, and therefore you should specify Bounds in the final scaled/flipped/rotated coordinate space.

If you are using BitmapTransform with a method that performs EXIF orientation, such as GetPixelDataAsync, note that the EXIF orientation operation is combined with the flip/rotate stage. In these cases the behavior of ScaledWidth and ScaledHeight are not affected as scaling occurs before flip/rotate. However, when specifying Bounds you need to account for coordinate space changes from Flip and Rotation, as well as 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 [Windows Store apps only]

Minimum supported server

Windows Server 2012 [Windows Store apps only]

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

 

 

Show:
© 2014 Microsoft