Cropping
A widely used image operation is cropping. This help article will describe which how to use cropping to get the image you want.
In addition to cropping/clipping that can occur when resizing images, Mighty Image provides the option to set an explicit crop region, or apply auto smart cropping on the subject in your image.
List of parameters
Cropping
Width (w)
You can specify the width using the w
parameter.
Integer Mandatory
Height (h)
You can specify the height using the parameter.
Integer Mandatory
Crop top (ct)
Specify where the crop needs to start from the top
Integer Mandatory
Crop left (cl)
Specify where the crop needs to start from the left
Integer Mandatory
Examples
Smart Auto Cropping
We support smart auto cropping. When enabled, our algorithm wil determine what the best region is to center the crop. This helps you to auto crop on the main subject like faces, objects, .. in your image. When using this mode, Mighty Image will crop and rescale the image to provide the best possible output image given the requested dimensions.
Smartcrop (sc)
Specify wether smart auto cropping should be enabled with sc
Boolean
Default: false
Optional
Width (w)
You can specify the width using the w
parameter.
Integer Mandatory when smart auto cropping is enabled
Height (h)
You can specify the height using the h
parameter.
Integer Mandatory when smart auto cropping is enable
Examples
Last updated on November 14, 2022