UNPKG

fabric-warpvas

Version:

This JavaScript library helps you efficiently build image warping tools on Fabric.js

10 lines (9 loc) 249 B
export const canvasToURL = async (canvas: HTMLCanvasElement) => new Promise<string>((resolve) => { canvas.toBlob((blob) => { if (blob) { const url = URL.createObjectURL(blob); resolve(url); } }); });