Three, and not because of anything this library chose:
HTMLCanvasElement.toBlob and toDataURL are what produce the bytes here,
and they write PNG, JPEG and WebP. GIF, APNG, TIFF, ICO, BMP, AVIF, PDF and
SVG are encoders in this project's Rust, which a page does not have — so
asking for one throws Unsupported file format.
Reach for them by drawing in the browser and encoding in Node, or by
feeding getImageData to a WebAssembly encoder in your own bundle.
The formats a browser can encode.
Three, and not because of anything this library chose:
HTMLCanvasElement.toBlobandtoDataURLare what produce the bytes here, and they write PNG, JPEG and WebP. GIF, APNG, TIFF, ICO, BMP, AVIF, PDF and SVG are encoders in this project's Rust, which a page does not have — so asking for one throwsUnsupported file format.Reach for them by drawing in the browser and encoding in Node, or by feeding
getImageDatato a WebAssembly encoder in your own bundle.