Transform in UWP Image Editor (SfImageEditor)

10 May 20211 minute to read

The image editor control can perform the image transformations namely, rotation and flip. The transformations can be achieved in the following two ways:

  • From Toolbar
  • Using Code

Rotation

From Toolbar

To rotate an image, in toolbar, click the Rotate button in the submenu of the Transforms. Clicking the button results in rotating the image to 90 degrees clockwise from the current state.

Using Code

Programmatically, the Rotate method is used in the SfImageEditor control to rotate the image.

NOTE

Angle cannot be specified in code to alter the rotation angle of the image

  • C#
  • imageEditor.Rotate();

    rotate

    Flip

    From Toolbar

    The ImageEditor control can show the mirror image. To get the mirror image of the loaded image, click Flip button in the submenu of the Transforms in the toolbar.

    Using Code

    The Flip method flips the image horizontally or vertically based on the FlipDirection; it is specified as argument for the Flip method.

    NOTE

    By default, image flips horizontally.

  • C#
  • imageEditor.Flip(FlipDirection.Horizontal);

    FlipImage