Document.trim

void trim (TrimType type, bool top, bool left, bool bottom, bool right)

Parameters

type The color or type of pixels to base the trim on.
top If true, trims away the top of the document.
left If true, trims away the left of the document.
bottom If true, trims away the bottom of the document.
right If true, trims away the right of the document.

Description

Trims the transparent area around the image on the specified sides of the canvas.