We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Create new image

Thread ID:





143338 Mar 14,2019 04:13 PM UTC Feb 19,2020 09:44 AM UTC UWP 4
Tags: SfImageEditor
Asked On March 14, 2019 04:13 PM UTC

How can I create a new (blank) image with the ImageEditor?
It does not seem possible.

Muneesh Kumar G [Syncfusion]
Replied On March 15, 2019 05:23 AM UTC

Hi Christian, 
Greetings from Syncfusion. 
We have analyzed your requirement and you can achieve this by adding custom toolbar item to SfImageEditor and set ImageSource as null in ToobarItemSelected as per the below code snippet.  
Code snippet 
<Grid Background="{ThemeResource ApplicationPageBackgroundThemeBrush}"  > 
      <image:SfImageEditor x:Name="imageEditor" ImageSource="floordiagram.png"></image:SfImageEditor> 
public MainPage() 
            FooterToolbarItem toolbarItem = new FooterToolbarItem(); 
            toolbarItem.Text = "New"; 
            imageEditor.ToolbarSettings.ToolbarItemSelected += ToolbarSettings_ToolbarItemSelected; 
        private void ToolbarSettings_ToolbarItemSelected(object sender, ToolbarItemSelectedEventArgs e) 
            if (e.ToolbarItem.Text == "New") 
                imageEditor.ImageSource = null; 
We have prepared a sample based on this, please find the sample from the following location.  
Hope it helps you.  
Muneesh Kumar G. 

Replied On March 15, 2019 11:20 AM UTC

Well, this does create a new image, but it crashes when you save the new image.
"Offset and length were out of bounds for the array or count is greater than the number of elements from index to the end of the source collection."


1) Run the sample UWP_Sample-860035795
2) Click "New"
3) Draw a line on the blank canvas
4) Click "Save"

The problem is that the ImageEditor Stream is null.

Santhiya Arulsamy [Syncfusion]
Replied On March 20, 2019 01:13 PM UTC

Hi Christian, 
Sorry for the inconvenience caused. 
We can reproduce the issue and we confirmed “Exception thrown when saving the ImageEditor without adding the image” as an issue. We will provide the patch on 2nd April,2019. We appreciate your patience until then.  
You can now track the status of your request, review the proposed resolution timeline, and contact us for any further inquiries through this link.  
Santhiya A 

Ramya Soundar Rajan [Syncfusion]
Replied On February 19, 2020 09:44 AM UTC

Hi Christian, 
We would like to let you know that the reported issue ““Exception thrown when saving the ImageEditor without adding the image” has already been moved. So, please check with our latest NuGet and let us know.  
Ramya S 


This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

Live Chat Icon For mobile
Live Chat Icon