Cloudimage - Documentation

Positionable crop

Allows to crop an image with a non-centred focal point. It is extremely useful when you want to crop a specific part of the image, like for example a face for a profile picture. To set the coordinates of the crop rectangle, use the tl_px or/and br_px operations.



To set the final size, you can use the width or/and height operations as described below.

Original image

Specify exact crop area

You can specify the top left and bottom right pixel of the crop rectangle. The image can be then resized to desired width.


tl_pxtop left pixel coordinatestl_px=900,0
br_pxbottom right pixel coordinatesbr_px=1300,600
wfinal image widthw=200

Specify only one crop corner

If you specify only top left or bottom right corner coordinates, the image is cropped and resized to the specified width or height, keeping proportions.


Combining positionable crop with resize modes

If you specify an exact crop rectangle, you can use all available resize modes - fit, bound or cover. For full details, see resize modes.


wfinal widthw=490
hfinal heighth=170
tl_pxtop left corner coordinatestl_px=310,70
br_pxbottom right corner coordinatesbr_px=1550,580
funcresize modefunc=fit
bg_colorbackground colorbg_color=3498db