Gravity center_xy with percentage values
I want to be able to set the "crop center" (i.e. a point that will be "cropped toward" when cropping is applied), which seems like what the `center_xy` gravity property does. Is there a way to pass a percentage value to x/y instead of a pixel value? If not, what is the pixel value for `center_xy` relative to? The original dimensions of the image? Or the post-crop dimensions?
-
Hi
Note that using "xy_center" uses the given coordinates that are used on the transformation itself.
You could use the ״custom״ gravity to crop according to a previously defined rectangle by specifying the coordinates of the rectangle during upload or on the UI (see the relevant button here).
That way you create an area of interest that the cropping would center upon.
You could read more about that in the link below:
https://cloudinary.com/documentation/image_upload_api_reference#upload_method
Hope this helps
0
Post is closed for comments.
Comments
1 comment