Focal point Crop
Setting crop gravity with focal point coordinates
Allows to crop an image by defining the coordinates of the crop focal point. It is useful when you want to crop images where the coordinates of the point of interest are already known.
To set the coordinates of the focal point, use the gravity=X,Y operation where X and Y are the coordinates of the focal point (in pixels). Alternatively, you can set the coordinates as a percentage of the original image - gravity=Xp,Yp or gravity=xc,yc, where X,Y=0..100 and x,y=0..1.
gravity=X,Y
gravity=Xp,Yp|xc,yc
Another way to set the coordinates is to save them as part of the file info metadata in the asset library and use the gravity=meta operation.
gravity=meta
All images having a custom focus point defined in the library, as a metadata associated to the the image) will use this as the focal point crop. If there is no focus point defined in the image metadata, gravity=meta falls back to gravity=auto.
Examples
Original image: /docs/castle.jpg?w=1000

Last updated

