Articles in this section
Category / Section

How to Resize the Image in the .NET MAUI Image Editor (SfImageEditor)

1 min read

Syncfusion .NET MAUI Image Editor (SfImageEditor) allows you to resize the image. The following demonstration will help you to understand how to resize the image.

XAML:

Initialize the Image Editor control and provide a ButtonClicked event to resize the image.

<Grid RowDefinitions="0.9*,0.1*">
   <imageEditor:SfImageEditor x:Name="imageEditor" 
                              Source="image.png"/>
   <Button Text="Save" 
           Clicked="OnButtonClicked" 
           Grid.Row="1" 
           HorizontalOptions="Center" 
           VerticalOptions="End" 
           Margin="0,0,20,20"/>
</Grid>

C#:

In the ButtonClicked event, resize the image by the Save method call with the newly defined size.

private void OnButtonClicked(object sender, EventArgs e)
{
   this.imageEditor.Save(imageSize: new Size(200, 200));
}

View the sample on GitHub.

Conclusion:
I hope you enjoyed learning how to resize the image in the .NET MAUI Image Editor (SfImageEditor).

Refer to our .NET MAUI ImageEditor’s feature tour page for other groundbreaking feature representations. You can also explore our .NET MAUI ImageEditor documentation to understand how to present and manipulate data.

For current customers, check out our .NET MAUI components from the License and Downloads page. If you are new to Syncfusion, try our 30-day free trial to check out our .NET MAUI Image Editor and other .NET MAUI components.

Please let us know in the following comment section if you have any queries or require clarifications. Contact us through our support forums, Direct-Trac, or feedback portal. We are always happy to assist you!</imageeditor:sfimageeditor>

Did you find this information helpful?
Yes
No
Help us improve this page
Please provide feedback or comments
Comments (0)
Please  to leave a comment
Access denied
Access denied