This is a migrated thread and some comments may be shown as answers.

Serverside API for Zoom option of image editor

1 Answer 45 Views
ImageEditor
This is a migrated thread and some comments may be shown as answers.
Chintha
Top achievements
Rank 1
Chintha asked on 07 Nov 2012, 06:05 AM
hi,
I want to zoom out/ zoom in the image from server side. Any Server side method for zoom the image using telerik image editor.
Actually i zoom out/Zoom the image from client side.But i need to do the same thing from server side.
My code:
  function OnClientLoad(sender, args) {
            if (sender._imageKey) {
              var Width = sender.getEditableImage().get_width();
              var Height = sender.getEditableImage().get_height();
           
                if (!isNaN(Number(objhdnOriginalWidth)) && Number(objhdnOriginalWidth) != 0 && !isNaN(Number(objhdnOriginalHeight)) && Number(objhdnOriginalHeight) != 0) {
                    if (objhdnOriginalWidth > 1000 || objhdnOriginalHeight > 600) {
                        var widthPercentage = (1000 * 100) / objhdnOriginalWidth;
                        var heightPercentage = (600 * 100) / objhdnOriginalHeight;
                        widthPercentage = Math.floor(widthPercentage);
                        heightPercentage = Math.floor(heightPercentage);
                        if (heightPercentage > widthPercentage) {
                             sender.zoomImage(widthPercentage);
                        }
                        else {
                            sender.zoomImage(heightPercentage);
                        }
                    }
                }
    }

please help me.

1 Answer, 1 is accepted

Sort by
0
Vessy
Telerik team
answered on 09 Nov 2012, 05:52 PM
Hi Chintha,

I am afraid to say that the desired scenario could not be achieved Server-Side. The operations which can be executed from the server are those which apply actual changes to the image (like Crop, Resize, Add text, etc. ). The Zoom functionality works on UI level and this is why it could be executed only Client-Side.

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.
Tags
ImageEditor
Asked by
Chintha
Top achievements
Rank 1
Answers by
Vessy
Telerik team
Share this question
or