resizeCanvas — Resize image boundaries

    Resize the boundaries of the current image to given width and height. An anchor can be defined to determine from what point of the image the resizing is going to happen. Set the mode to relative to add or subtract the given width or height to the actual image dimensions. You can also pass a background color for the emerging area of the image.

    The new width in pixels of the image in absolute mode or the amount of pixels to add or subtract from height in relative mode.

    Set a point from where the image resizing is going to happen. For example if you are setting the anchor to this side is pinned and the values of width/height will be added or subtracted to the top-right corner of the image.

    The possible values for this parameter are:

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

    A background color for the new areas of the image. The background color can be passed in different color formats. Default: , transparent if supported by the output format

    Resized instance of Intervention\Image\Image