Adobe-Consulting-Services / acs-aem-commons

http://adobe-consulting-services.github.io/acs-aem-commons/
Apache License 2.0
454 stars 602 forks source link

Named Transform ImagIe Servlet Crop percentage support #879

Closed theorise closed 7 years ago

theorise commented 7 years ago

I am looking at the documentation for the image transform servelets and I see that the parameters required for cropping only support pixels.

Our content editing team use different sized images across the site and it would be really useful to be able to use percentage values as options so you could, for example, crop an image from the center.

davidjgonzalez commented 7 years ago

@theorise checkout the notation described in the comments of #819

transforms="[crop:bounds=25%\,0\,50%\,100%,resize:width=1280]"

This should be supported in the latest versions of ACS Commons.

theorise commented 7 years ago

@davidjgonzalez nice, thank you!