Specify the trim mode used to remove non-edge color areas from the image.
Values
Accepted values for this parameter are auto and color.
This parameter is affected by the level or intensity of the trim process, specified by trim-level parameter.
Auto trim=auto
Will trim the image based on the top left pixel color.
We will use the following source image to apply trim parameter:
GET
https://assets.imglab-cdn.net/woman-04.jpeg
In the following example we are using trim=auto. The top left pixel color will be taken as reference and trimmed from the image:
GET
https://assets.imglab-cdn.net/woman-04.jpeg?trim=auto
Color trim=color
Will trim the image based on the color specified by trim-color parameter.
We will use the following source image to apply trim=color parameter:
GET
https://assets.imglab-cdn.net/orange.jpeg
In the following example we will use trim=color and trim-color=orange parameters to remove orange areas surrounding the image:
GET
https://assets.imglab-cdn.net/orange.jpeg?trim=color&trim-color=orange