UNPKG

warpvas

Version:

This JavaScript library enables fast and efficient image distortion transformations using Canvas 2D.

13 lines (10 loc) 436 B
### 10. Set Output Canvas Size Limit Limit the maximum size of the distorted output canvas. When distortion results in an oversized canvas, the system will automatically scale the result proportionally within limits to prevent rendering failures due to memory constraints. ```typescript const warpvas = new Warpvas(canvas); // Limit output height to 100px, width scales proportionally warpvas.setOutputLimitSize({ height: 100 }); ```