top | item 46380117

(no title)

DaleCurtis | 2 months ago

FWIW, you can do this with a few lines of JS in the browser using canvas.drawImage() from an img element followed by canvas.toBlob().

discuss

order

valadaptive|2 months ago

Firefox now adds random noise to all canvas readback operations (getImageData, toDataURL, and toBlob).

DaleCurtis|2 months ago

Ah, I didn't realize that always happened. I thought it was only if you did something that might have OS specific rendering characteristics (text-draws, etc).

Maybe having an ImageEncoder API might be worthwhile after all then https://github.com/w3c/webcodecs/issues/204.