Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • stephen 8 posts 53 karma points
    Nov 20, 2014 @ 14:36
    stephen
    0

    GetCropUrl

    I am using the GetCropUrl via the Image Cropper but althought the images are displayed to the correct dimensions, they do not appear to be using the focus point (so the tops of images are cut off)

     

    <img src="@imgThmb.GetCropUrl(@tWidth, @tHeight, null, cropAlias: "crop143_143", quality: 100, imageCropMode: ImageCropMode.Crop, imageCropAnchor: ImageCropAnchor.Center, preferFocalPoint: true, useCropDimensions: true, cacheBusterValue: null, furtherOptions: null, ratioMode: ImageCropRatioMode.Height, upScale: false)" alt="@newsitemnode.GetProperty("pageTitle").Value" />

     

    is an example where I have tried a multiple of configurations.

    Using IE7.1

    I dont want to use the ImageCropAnchor set to Top

    Is there something I am missing?

  • Jan Skovgaard 11280 posts 23678 karma points MVP 10x admin c-trib
    Nov 20, 2014 @ 14:43
    Jan Skovgaard
    1

    Hi Stephen

    Are you using IE7 or is it Umbraco 7.1 you're using? I suppose it's Umbraco 7.1? Since I suppose IE7 would not be able to run Umbraco 7.

    Have you had a look in the image cropper documentation? http://our.umbraco.org/documentation/Using-Umbraco/Backoffice-Overview/Property-Editors/Built-in-Property-Editors-v7/Image-Cropper

    /Jan

  • Dennis Aaen 4499 posts 18254 karma points admin hq c-trib
    Nov 20, 2014 @ 14:49
    Dennis Aaen
    0

    Hi Stephen,

    Another good reference for the ImageCropper is to see this http://uhangout.co.uk/video/bQsvGmnYaUU episode of uHangout where Jeavon Leopold talks about how to configure it. and make it work with responsive images.

    /Dennis 

  • stephen 8 posts 53 karma points
    Nov 25, 2014 @ 10:06
    stephen
    0

    Hi

    thanks for responding. Had a look at the video but it didn't cover "preferFocalPoint: true".

    The "ImageCropAnchor" appears to work. If I alternate between Top, Bottom and Center it seems to respond, but if I move the focal point or adjust the positioning of the image in the cropping tool it makes no difference (although the thumbnail in the admin does reflect the changes).

    I've tried all sorts of combinations of the params but to no avail.

    BTW the image is an image upload, not a Media file (umbracoFile).

    A bit frustrating.

  • Jan Skovgaard 11280 posts 23678 karma points MVP 10x admin c-trib
    Nov 25, 2014 @ 10:09
    Jan Skovgaard
    0

    Hi Stephen

    Could you show the code you're trying to use?

    And could you explain what you mean by "BTW the image is an image upload, not a Media file (umbracoFile)".

    When you upload an image or a file in Umbraco both will be treated as umbracoFile when you need to fetch the data. So unless you have made a custom image type then I'm not sure what you mean? :)

    /Jan

  • Jeavon Leopold 3072 posts 13628 karma points MVP 10x admin c-trib
    Nov 25, 2014 @ 10:12
    Jeavon Leopold
    1

    Hi Stephen,

    If you want to use only the focal point to crop then only pass in your width and height and then you will get a crop around your focal point.

    e.g.

    <img src="@imgThmb.GetCropUrl(tWidth, tHeight, "propertyAliasOfYourCropper")" />
    

    Also I don't see the alias of your content image cropper property?

    Jeavon

  • Jan Skovgaard 11280 posts 23678 karma points MVP 10x admin c-trib
    Nov 25, 2014 @ 10:13
    Jan Skovgaard
    0

    Ah, sorry I missed the code part since I just skimmed and saw it as text...d'oh! :)

    /Jan

Please Sign in or register to post replies

Write your reply to:

Draft