Canvas-Toolkit / CanvasKit

A comprehensive library for working with the Canvas API.
MIT License
20 stars 12 forks source link

Implementing the saveAsFile and getImageData methods #17

Open SumitGTechPro opened 1 year ago

SumitGTechPro commented 1 year ago

In these implementations, the saveAsFile method converts the canvas content to a Blob, creates a download link, and triggers a click event to download the file. The getImageData method converts the canvas content to a data URL and then fetches and converts it into a Uint8Array.