Copied to clipboard

Flag this post as spam?

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


  • Dan 1288 posts 3921 karma points c-trib
    Aug 05, 2014 @ 12:09
    Dan
    1

    Crop focal point not recognised by ImageResizer

    Hi,

    I have a requirement to use Image Resizer (http://imageresizing.net/) instead of Image Processor. I've installed Image Resizer and have removed the Image Processor dlls and the images render okay, to a point. The website is running Umbraco 7.1.3.

    However, the focal point doesn't seem to be effective. e.g. I can call this image URL directly in a template and it will always render the same, regardless of where the focal point is saved:

    http://example.com/media/3259/test.jpg?width=100&height=200&mode=crop

    The image is plenty big enough to render different crops, so it's not image dimensions that are the problem. It just doesn't seem like Image Resizer is aware of the focal point position.

    Is this expected behaviour? If so, is there a workaround to get Image Resizer to recognise the focal point?

    Thanks

  • Jeroen Breuer 4908 posts 12265 karma points MVP 5x admin c-trib
    Aug 05, 2014 @ 12:48
    Jeroen Breuer
    0

    I don't think the focal point for the v7 Image Cropper is implemented at all because it required to many references. So it probably won't matter if you use ImageResizer or ImageProcessor.

    Jeroen

  • Dan 1288 posts 3921 karma points c-trib
    Aug 05, 2014 @ 13:17
    Dan
    0

    Ah, okay, that's a bit of a surprise then! So the focal point serves no purpose unless you're using pre-defined crops? Since the focal point coordinate is stored with the image object it wouldn't seem to be too difficult in theory to use that to establish a crop dynamically, but there must be something more complicated in there that I don't understand :)

    I noticed that Image Resizer also doesn't respect crop aliases via the 'GetCropUrl' method, so I'm currently looking at Jeavon's Image Resizer methods (https://github.com/Jeavon/umbraco7-imagecropper/blob/master/ImageCropper/ImageResizer/ImageResizer.cs) which does this. I don't know why but I thought this stuff was core now, but obviously not, hence the confusion.

    Thanks Jeroen.

  • Jeroen Breuer 4908 posts 12265 karma points MVP 5x admin c-trib
    Aug 05, 2014 @ 13:30
    Jeroen Breuer
    0

    Sorry I think I misread your first post. The focal point works, but it always starts at the centre of the image. If you try using ImageProcessor with the GetCropUrl extension method it should work. Maybe try that first.

    Jeroen

  • Jeavon Leopold 3074 posts 13632 karma points MVP 11x admin c-trib
    Aug 05, 2014 @ 13:37
    Jeavon Leopold
    100

    Hi Dan,

    I actually looked at developing a package to implement a helper method to work with the v7 core cropper and ImageResizer however I found that to use the v7 focal point with ImageResizer would require the CropAround plugin which is part of the Elite package. I didn't get any further than that, I do have some WIP code which does work with the crop aliases, I would happily share if you're interested (DM me on Twitter).

    Jeavon

  • wolulcmit 357 posts 693 karma points
    Sep 02, 2014 @ 03:47
    wolulcmit
    0

    Bummer, there's no way to use ImageResizer plugins with the current ImageProcessor.dll then? just want to take advantage of the Simple Filters plugin like black & white etc.

    More importantly the need to use the Imageresizer Cache plugin is number one on the wishlist.

  • Jeavon Leopold 3074 posts 13632 karma points MVP 11x admin c-trib
    Sep 03, 2014 @ 17:05
    Jeavon Leopold
    0

    Hey Tim,

    ImageProcessor and ImageResizer are two different non related products that work in a similar way. ImageProcessor is open source and includes disk caching and many other options including black and white filters. ImageProcessor is shipped with Umbraco v7.1+ Details on ImageProcessor are here

    ImageReiszer is a commercial product and to use with the v7 Cropper you need to have a license for CropAround. I have a library developed with Dan which allows you to use ImageResizer (and any plugins you require) with the Umbraco v7 Cropper instead of ImageProcessor, I can give you access if you would like?

    Jeavon

Please Sign in or register to post replies

Write your reply to:

Draft