Trim
Trim removes the same color pixels from the edges of the image. This is useful when you want to remove the white space around an image.
info
trim can be combined with all other options.
| Transformation | Examples | Description |
|---|---|---|
trim=tolerance | trim=20&resize=100,100 trim=10&resize=100,100 | request a trimmed image with tolerance |
The transformation parameters are described below:-
| Parameter | Description |
|---|---|
tolerance | can be 0 to 10, where 0 compares edge pixel colors strictly and 10 treats them equal if they are close enough. A tolerance of 10 will trim even if they are small color gradient in surrounding pixels. |