Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 18 additions & 12 deletions uwp/Image-Editor/transformation.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,24 +7,28 @@ control: SfImageEditor
documentation: ug
---

The following namespace is required for performing image transformations in the SfImageEditor control:

* `Syncfusion.UI.Xaml.ImageEditor.Enums`

# Transform in UWP Image Editor (SfImageEditor)

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

* From Toolbar
* Using Code
* From the toolbar
* Using code

## Rotation

### From Toolbar
### From the 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.
To rotate an image, in the toolbar, click the `Rotate` button in the submenu of `Transforms`. Clicking the button rotates the image 90 degrees clockwise from its current state.

### Using Code
### Using code

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

N> Angle cannot be specified in code to alter the rotation angle of the image
N> An angle cannot be specified in code to alter the rotation angle of the image.


{% highlight C# %}
Expand All @@ -38,19 +42,21 @@ N> Angle cannot be specified in code to alter the rotation angle of the image

## Flip

### From Toolbar
### From the 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.
The SfImageEditor control can show the mirror image. To get the mirror image of the loaded image, click the `Flip` button in the submenu of `Transforms` in the toolbar.

### Using Code
### Using code

The `Flip` method flips the image horizontally or vertically based on the [`FlipDirection`](https://help.syncfusion.com/cr/uwp/sfimageeditor); it is specified as argument for the Flip method.
The `Flip` method flips the image horizontally or vertically based on the [`FlipDirection`](https://help.syncfusion.com/cr/uwp/sfimageeditor), which is specified as an argument for the `Flip` method.

N> By default, image flips horizontally.
N> By default, the image flips horizontally.


{% highlight C# %}

using Syncfusion.UI.Xaml.ImageEditor.Enums;

imageEditor.Flip(FlipDirection.Horizontal);

{% endhighlight %}
Expand Down
Binary file modified uwp/Image-Editor/transformation_images/FlipImage.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified uwp/Image-Editor/transformation_images/rotate.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.