Bitmap​Transform Bitmap​Transform Bitmap​Transform Bitmap​Transform Class

Definition

Contains transformations that can be applied to pixel data.

public : sealed class BitmapTransform : IBitmapTransformpublic sealed class BitmapTransform : IBitmapTransformPublic NotInheritable Class BitmapTransform Implements IBitmapTransform// You can use this class in JavaScript.
Attributes
Windows 10 requirements
Device family
Windows 10 (introduced v10.0.10240.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v1)

Remarks

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

The 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.

Constructors

BitmapTransform() BitmapTransform() BitmapTransform() BitmapTransform()

Creates a new BitmapTransform object.

public : BitmapTransform()public BitmapTransform()Public Sub New()// You can use this method in JavaScript.

Remarks

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

Properties

Bounds Bounds Bounds Bounds

Specifies the bounding rectangle that is used to crop the bitmap. This rectangle is defined in the coordinate space after scale, rotation, and flip are applied.

public : BitmapBounds Bounds { get; set; }public BitmapBounds Bounds { get; set; }Public ReadWrite Property Bounds As BitmapBounds// You can use this property in JavaScript.
Value
BitmapBounds BitmapBounds BitmapBounds BitmapBounds

A structure that specifies the bounding rectangle.

Flip Flip Flip Flip

Specifies the flip operation that is used to transform the bitmap.

public : BitmapFlip Flip { get; set; }public BitmapFlip Flip { get; set; }Public ReadWrite Property Flip As BitmapFlip// You can use this property in JavaScript.
Value
BitmapFlip BitmapFlip BitmapFlip BitmapFlip

The type of flip operation. One of the values of the BitmapFlip enumeration.

InterpolationMode InterpolationMode InterpolationMode InterpolationMode

Specifies the interpolation mode that is used to scale the bitmap.

public : BitmapInterpolationMode InterpolationMode { get; set; }public BitmapInterpolationMode InterpolationMode { get; set; }Public ReadWrite Property InterpolationMode As BitmapInterpolationMode// You can use this property in JavaScript.

Rotation Rotation Rotation Rotation

Specifies the rotation operation that is used to transform the bitmap.

public : BitmapRotation Rotation { get; set; }public BitmapRotation Rotation { get; set; }Public ReadWrite Property Rotation As BitmapRotation// You can use this property in JavaScript.
Value
BitmapRotation BitmapRotation BitmapRotation BitmapRotation

The type of rotation. One of the values of the BitmapRotation enumeration.

ScaledHeight ScaledHeight ScaledHeight ScaledHeight

Specifies the height, in pixels, of the bitmap after it is scaled. This is defined in the coordinate space of the source image, before rotation and flip are applied.

public : unsigned short ScaledHeight { get; set; }public uint ScaledHeight { get; set; }Public ReadWrite Property ScaledHeight As uint// You can use this property in JavaScript.
Value
unsigned short uint uint uint

The height of the bitmap, in pixels.

ScaledWidth ScaledWidth ScaledWidth ScaledWidth

Specifies the width, in pixels, of the bitmap after it is scaled. This is defined in the coordinate space of the source image, before rotation and flip are applied.

public : unsigned short ScaledWidth { get; set; }public uint ScaledWidth { get; set; }Public ReadWrite Property ScaledWidth As uint// You can use this property in JavaScript.
Value
unsigned short uint uint uint

The width of the bitmap, in pixels.