Hacker News new | ask | show | jobs
by marginalia_nu 1680 days ago
Dithering is fairly expensive operation. Please don't do it client-side each time a resource is fetched.
1 comments

It's much cheaper than decompressing a JPEG
Compressing, perhaps. But decompressing? Not really.
Floyd-steinberg dithering is at least an order of magnitude cheaper than JPEG decompression
Maybe if all else is equal, but let's not forget you'd be doing the dithering in javascript, and the JPEG decompression is implemented in a low level language, in practice probably hand written assembly (as performance-critical compression code often is).