RadImageEditor getEditableImage saves uncropped version of the image

3 posts, 0 answers
  1. Aadil
    Aadil avatar
    2 posts
    Member since:
    Apr 2014

    Posted 10 Apr 2014 Link to this post

    Hi Telerik team,

    I am a newbie programmer and have been using Telerik since a couple of months now.

    I am trying to implement the follwing process:

    1. User uploads an Image on RadImageEditor using AsyncUpload
    2. User crops the image
    3. User clicks on CreateProfile button on the page.
    4. The cropped image should be stored in the database.

    Problem: The uncropped version of the image gets stored. I think I am doing something wrong. Would be great if you could help



    <telerik:RadImageEditor  ID="ImageEditor_CreateNewUser"   CanvasMode="No" runat="server" Height="500px" Width="700px"     OnImageLoading="ImageEditor_CreateDonor_ImageLoading" OnClientCommandExecuting="OnClientCommandExecuting">

    <asp:Button ID="BtnDonorSave" Text="Create Donor" ValidationGroup="CreateDonorSubmit" runat="server" OnClick="BtnDonorSave_Click" />

      .aspx.cs - 

            protected void ImageEditor_CreateNewUser_ImageLoading(object sender, ImageEditorLoadingEventArgs args)
                if (!Object.Equals(Context.Cache.Get(Session.SessionID + "UploadedFile"), null))
                    using (EditableImage image = new EditableImage((MemoryStream)Context.Cache.Get(Session.SessionID + "UploadedFile")))
                        args.Image = image.Clone();
                        args.Cancel = true;
     protected void BtnDonorSave_Click(object sender, EventArgs e)
                 EditableImage ei = ImageEditor_CreateDonor.GetEditableImage();
                MemoryStream s = new MemoryStream();
                ei.Image.Save(s, ei.RawFormat);
                byte[] imgData = s.ToArray();

                db.CreateUser(userId, imgData);


  2. Aadil
    Aadil avatar
    2 posts
    Member since:
    Apr 2014

    Posted 10 Apr 2014 in reply to Aadil Link to this post

    Please note it is "ImageEditor_CreateNewUser" instead of "ImageEditor_CreateDonor" . 
    Aadil said:
                 EditableImage ei = ImageEditor_CreateDonor.GetEditableImage();


  3. DevCraft R3 2016 release webinar banner
  4. Vessy
    Vessy avatar
    1354 posts

    Posted 15 Apr 2014 Link to this post

    Hi Aadil,

    We are aware of a similar to the the described issue and it has been logged into our bug-tracking portal. You can track its progress and vote for it here: A large uploaded image is not saved properly after cropping in disabled CanvasMode

    I will contact our developers in order to increase the priority of the bug. Unfortunately, the only workaround I could suggest you for the moment is to use the ImageEditor in enabled CanvasMode, calling the control's saveImageOnServer() method in the ClientClick handler of the button.

    Kind regards,

    Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

Back to Top