Async Upload, fixed crop and resize image

2 posts, 0 answers
  1. Saltug
    Saltug avatar
    3 posts
    Member since:
    Jul 2010

    Posted 24 Apr 2014 Link to this post


    I want to add some images to my database to a binary data field.
    But the image sould always the same size. But the original file can be different.
    When i add the fila via Async upload, the file must first resize to my dimensions and fit the longer edge. Then the crop tool should run automatically and appears on imageEditor (no other tools) and the user sould set the crop the image by the correct aspect ratio.

    At the final i want it save as a binary file to my database.

    What i want is all images in my database sould 800 px x 300 px. But this is not a most common used ratio. Images must resized and cropped. This is ok but the image must always cropped by the user, because it can crop a false side if i make this automatically.

    I dont want a tool inside my imageEditor. The crop will run after the upload and users will crop the image only at 800x300 and click a button to finish the proces.

    So how can i make this? Is there a sample that i can use it?

  2. Slav
    Slav avatar
    1359 posts

    Posted 29 Apr 2014 Link to this post

    Hi Serhan,

    I have attached a sample that shows how to upload an image in the RadImageEditor control, to customize the Crop command so that the size of the crop box is changed and to fire the crop command when the image is uploaded.

    This sample is based on the Upload and Edit Image demo and the information in the help article Custom Crop Settings.

    Note that the uploaded image is accessible in the event handler RadImageEditor1_ImageLoading as the image variable (which is an instance of EditableImage), so you can use it to change the size of the image in the editor as required in your scenario.


    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