This is a migrated thread and some comments may be shown as answers.
Cropping
5 Answers 66 Views
This is a migrated thread and some comments may be shown as answers.
Kevin Donahue
Top achievements
Rank 1
Kevin Donahue asked on 22 Jul 2011, 07:47 AM
I set my crop size to 300 by 100 using the dialog. I move the crop rectangle, and the width in the dialog changes to 298 and the height to 112. This is in IE.  Is there a fix?

5 Answers, 1 is accepted

Sort by
0
Rumen
Telerik team
answered on 22 Jul 2011, 11:01 AM
Hello Kevin,

Thank you for reporting this bug.

I logged it for fixing in our PITS system and updated your Telerik points. Here you can find the PITS Issue: Public URL.

Best regards,
Rumen
the Telerik team

Register for the Q2 2011 What's New Webinar Week. Mark your calendar for the week starting July 18th and book your seat for a walk through of all the exciting stuff we will ship with the new release!

0
Manuel
Top achievements
Rank 1
answered on 26 Jul 2011, 02:43 PM
Hello.
I have two questions:
1.Is it possible to set the crop to a fixed ratio? For example: I click a checkbox and the crop-ratio gets fixed to 2:1?
2.Is it possible to customise the picture upload in such a faschion that every picture wll be transformed into a black/white only picure? (no grey-shadings.)
Thank you,
Manuel Radons.
0
Niko
Telerik team
answered on 28 Jul 2011, 11:16 AM
Hello Manuel,

Before I review your request and questions, I wish to remind you that it is not a good practice to create off topic threads as the other members of the community may find it difficult to locate the provided solutions.

Now onto the fun part - the first request is doable, although it involves several workarounds. What you need to do is attach to the OnClientCommandExecuted and change the default size ratio. The tricky part is that the content of the dialog may still not be loaded and and a waiting method needs to be implemented. Here is a sample implementation:
function modifyCommand(imageEditor, args) {
    waitForCommand(imageEditor, args.get_commandName(), function(widget) {
        var ratio = 2;
        widget._constraintBtn.set_checked(true);
        widget._sizeRatio = ratio;
        widget._setCropBoxRatio(ratio);
        widget.set_width(100); //in order to force the ratio onto the control
        widget._updateCropBoxFromControls();
    });
}
  
function waitForCommand(imageEditor, commandName, callback) {
    var timer = setInterval(function() {
        var widget = imageEditor.get_currentToolWidget();
        if(widget && widget.get_name() == commandName) {
            clearInterval(timer);
            callback(widget);
        }
    }, 100);
}
The modifyCommand is the event handler method.

As far as the second question is concerned, the ImageEditor still does not support image filters, therefore it is not possible to utilize it for making the image black&white.

Hope this helps.

Regards,
Niko
the Telerik team

Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.

0
Manuel
Top achievements
Rank 1
answered on 28 Jul 2011, 02:18 PM
Thanks a lot!
I will keep your remarks in mind for future "threading"-behaviour.
Kind regards,
Manuel.
0
Niko
Telerik team
answered on 05 Aug 2011, 02:08 PM
Hi Manuel,

This reply is simply to inform you that the issue with the sizing of the crop box is fixed. You can find the corresponding solution either in the next internal build or in the upcoming service pack.

Thank you for you patience and understanding.

Regards,
Niko
the Telerik team

Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.

Asked by
Kevin Donahue
Top achievements
Rank 1
Answers by
Rumen
Telerik team
Manuel
Top achievements
Rank 1
Niko
Telerik team
Share this question
or