Add area of interest coordinates in the asset library

First of all, thank you for the Image transformation api! It works great, I just have a couple of wishlist items.

Since the area of interest can vary depending on the image, I think it would be useful to be able to set the area of interest coordinates on the image itself in the asset library. I have a few line art hero images that don't crop well as thumbnails, so I need a way to say these particular images need to be zoomed in.

I also noticed that when using the zoom function, the width and height get cut. e.g. fit=crop&crop=focalpoint&fp-z=2&w=150&h=150 returns a 75x75 image and fit=crop&crop=focalpoint&fp-z=3&w=150&h=150 returns a 50x50 image. I think it should stay the size specified in the parameters.



  •[email protected] Czech RepublicMember, Administrator, Kentico Staff admin
    edited July 2018

    Hello @mmanderson ,

    Great to hear from you again and great to hear you like the image transformation API!

    The reason why your image was returned with smaller dimensions is that there is one rule that has higher priority: the image should not be upscaled (and got blurry with that ugly pixelation in it). Therefore, it would be perfectly fine if you set the width and height to the double values.

    If there's anything else you have feedback on or are uncertain about, just let me know and I'll happily help more.


  •[email protected] Czech RepublicMember, Administrator, Kentico Staff admin

    Hello @mmanderson ,

    Our heroes in the Delivery development team provided me with some in-depth information about the API. In fact, the width and height parameters were not supposed to be used together with the focal point method.

    As you've expressed your intention to get a 150*150 image, I think you may want to use the ?rect=[left starting point],[top starting point],[width],[height] query string parameters instead. I personally find this more exact than choosing the "focal point + zoom + dimensions" way.

    I understand that this would require you to know the exact dimensions of each of the images upfront. But, if your source images vary in their dimensions, you could potentially wrap your assets into a content type with elements saying what the preferred cropping rectangle is (either by typing in absolute values in pixels, or, relative values expressed as floats).

    One way or another, is that what would help? Did I understand your scenario well?


Sign In or Register to comment.