Cropping

6 posts, 0 answers
  1. Kevin Donahue
    Kevin Donahue avatar
    33 posts
    Member since:
    Oct 2009

    Posted 22 Jul 2011 Link to this post

    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?
  2. Rumen
    Admin
    Rumen avatar
    12846 posts

    Posted 22 Jul 2011 Link to this post

    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!

  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Manuel
    Manuel avatar
    7 posts
    Member since:
    Mar 2011

    Posted 26 Jul 2011 Link to this post

    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.
  5. Niko
    Admin
    Niko avatar
    387 posts

    Posted 28 Jul 2011 Link to this post

    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.

  6. Manuel
    Manuel avatar
    7 posts
    Member since:
    Mar 2011

    Posted 28 Jul 2011 Link to this post

    Thanks a lot!
    I will keep your remarks in mind for future "threading"-behaviour.
    Kind regards,
    Manuel.
  7. Niko
    Admin
    Niko avatar
    387 posts

    Posted 05 Aug 2011 Link to this post

    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.

Back to Top
UI for ASP.NET Ajax is Ready for VS 2017