Cropping
Crop
Parameter: crop
Units: Pixels
Format 1: width,height
Format 2: width,height,x,y
Crop the output image to the given width and height. Two formats are accepted. Format 1 only includes the width and height of the crop. Format 2 also includes the X and Y offsets that determine where the crop should start. Image resizing with the width and height parameters is processed after the crop.
If only width and height are given, the Crop Gravity parameter will be used.
Image resizing with the width and height parameters is processed after the crop. Make sure to base the values on the original image dimensions.
Aspect Ratio Crop
Parameter: aspect_ratio Default value: auto
Crop the output image to match the given aspect ratio. The default origin point (gravity) is set to the center of the image.
Crop Gravity
Parameter: crop_gravity
Default: center
Values: center, east, north, south, west, northeast, northwest, southeast, southwest
Set the gravity of the crop operation. This is used with Format 1 cropping only and snaps the crop to the selected position.
Original:
Focus crop
Parameter: focus_crop
Format 1: width,height,x_coordinate,y_coordinate
Format 2: width,height,x_relative,y_relative
Focus crop is similar to a four-parameter crop function but you define the center of your crop instead of the start of a crop. This ensures that what you are trying to focus on is positioned in the middle of the picture where possible. If the focus is set too close to the borders of the image for a given width and height, the focus will be moved to ensure the cropped image matches the wanted dimensions.
x and y can be either absolute values or a relative offset that ranges between 0.0 and 1.0. The optimizer will treat any decimal value as a relative offset.
Updated 14 days ago