how to zoom the image in reset function of image editor.

6 posts, 0 answers
  1. Chintha
    Chintha avatar
    11 posts
    Member since:
    May 2012

    Posted 27 Nov 2012 Link to this post

    By using this code image is not zoom as per provided value.But in image editor zoom value displayed as 40.
    how can i zoom the image on reset function using java script.
    I used this below code:

    script:
    function OnClientCommandExecuted(imageEditor, args) {
    if (args.get_commandName() == "Reset") {
                imageEditor._zoomImage(40);
      }
    }
    Aspx:
      <telerik:RadImageEditor ID="rieControl" runat="server"
                            OnClientLoad="OnClientLoad" OnClientCommandExecuted="OnClientCommandExecuted">
      </telerik:RadImageEditor>
  2. Vessy
    Admin
    Vessy avatar
    1380 posts

    Posted 27 Nov 2012 Link to this post

    Hi Chintha,

    I managed to reproduce the described issue by setting the CanvasMode of the ImageEditor to "No" and it turns to be a bug in RadImageEditor. I have logged it into our PIT system, so you could track its progress in here: PITS.

    As a small token of our gratitude for your efforts I have updated your Telerik points.

    The only workaround I could suggest you for now is to use the default CanvasMode of ImageEditor or to set it to "Yes". Additionally, I want to kindly recommend you to use the public methods of the ImageEditor whenever it is possible, e.g the zoomImage(40) instead of _zoomImage(40).

    Regards,
    Vesi
    the Telerik team
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Chintha
    Chintha avatar
    11 posts
    Member since:
    May 2012

    Posted 28 Nov 2012 Link to this post

    Hi,

    Actually we are using Telerik product version: 2012.1.215.40. 
     'CanvasMode' property is not available in this version.
    By using zoomImage() method also not getting desired result.Only zoom level is changing, but not update UI as per zoom level.
    Any suggestions for this problems.
  5. Vessy
    Admin
    Vessy avatar
    1380 posts

    Posted 30 Nov 2012 Link to this post

    Hi Chintha,

    It turn out that a there is some additional time needed for the ImageEditor to apply the zoom level on the image, thus a little timeout will fix the issue:
    function OnClientCommandExecuted(imageEditor, args) {
        if (args.get_commandName() == "Reset") {
            setTimeout(function myfunction() {
                imageEditor.zoomImage(40);
            }, 50)
        }
    }

    Kind regards,
    Vesi
    the Telerik team
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
  6. Chintha
    Chintha avatar
    11 posts
    Member since:
    May 2012

    Posted 30 Nov 2012 Link to this post

    Yes, it is working.
    Thanks for the help.
  7. Arron
    Arron avatar
    22 posts
    Member since:
    Apr 2013

    Posted 21 Aug 2013 Link to this post

    I am glad to see that your probelm had been solved already. But I am almost a green hand on the image processing program. I have only tried  the free trial package of an image and document processing tool to scale images and do each step according to its tutorials about how to scale images using C#.NET. I want to know the difference between them. Thanks in advance.



    Best regards,
    Arron
Back to Top
UI for ASP.NET Ajax is Ready for VS 2017