Skip to content

Function: trimCanvas() ​

ts
function trimCanvas(source): CompatCanvas;

Defined in: packages/minerender/src/canvas/trimCanvas.ts:4

Copies the nontransparent bounds without resizing the source; empty images become one transparent pixel.

Parameters ​

ParameterType
sourceCompatCanvas

Returns ​

CompatCanvas