trim — Trim away parts of an image

    Trim away image space in given color. Define an optional base to pick a color at a certain position and borders that should be trimmed away. You can also set an optional tolerance level, to trim similar colors and add a feathering border around the trimed image.

    Note: Resource intensive with GD driver. Use with care.

    Possible values are:

    • top-left (default)
    • bottom-right
    • transparent

    Border(s) that should be trimmed away. You can add multiple borders. as an array of values. Possible values are:

    • top
    • left
    • right

    Define a percentaged tolerance level between 0 and 100 to trim away similar color values. Default: 0

    Sometimes it may be useful to leave a untouched “border” around an object while trimming. Especially when trimming non-solid backgrounds you can expand (positive value) or contract (negative value) the space around the trimed object by a certain amount of pixels. Default: 0