Specify the horizontal x position of the focal point for the image.
Values
This parameter accepts floats values in the range 0.0
to 1.0
. With 0.0
as the horizontal left border of the image and 1.0
as the right border.
The default value for this parameter is 0.5
, which matches the horizontal center of the image.
Examples
The red crosshair representing the position of the default focal point can be seen by setting the focal-point-debug
parameter to true
:
GET
https://assets.imglab-cdn.net/beach.jpeg?focal-point-debug=true
We can then set a value of 0.37
for focal-point-x
using focal-point-x=0.37
:
GET
https://assets.imglab-cdn.net/beach.jpeg?focal-point-x=0.37&focal-point-debug=true
Once we have positioned the focal point where we want it, we can crop the image to be centred on the focal point using mode=crop
and crop=focalpoint
parameters:
GET
https://assets.imglab-cdn.net/beach.jpeg?mode=crop&crop=focalpoint&focal-point-x=0.37&focal-point-debug=true
Finally, we can either remove the focal-point-debug
parameter or set its value to false
to stop the crosshair appearing over the image:
GET
https://assets.imglab-cdn.net/beach.jpeg?mode=crop&crop=focalpoint&focal-point-x=0.37