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.
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.