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 hn newest 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. fouc|2 months ago That would require a browser that supports WebP theandrewbailey|2 months ago ...which is, like, all of them released over the past 5 years: https://caniuse.com/webp
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.
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.
fouc|2 months ago That would require a browser that supports WebP theandrewbailey|2 months ago ...which is, like, all of them released over the past 5 years: https://caniuse.com/webp
theandrewbailey|2 months ago ...which is, like, all of them released over the past 5 years: https://caniuse.com/webp
valadaptive|2 months ago
DaleCurtis|2 months ago
Maybe having an ImageEncoder API might be worthwhile after all then https://github.com/w3c/webcodecs/issues/204.
fouc|2 months ago
theandrewbailey|2 months ago