Documentation

trim Trim Image

Trims the image to remove a uniform border around the image. This operation must be set for the other trim parameters to work, and it will change the size of the image.

There are 2 available values: auto and color.

  • When the trim parameter is set to auto, the image is trimmed automatically based on the border color. You can adjust the tolerance using trimmd and trimsd.
  • When the trim parameter is set to color, the image will trim the away the color specified by trimcolor, as long as it is within the trimtol threshold .