andrewstephens75 / as-dithered-image

HTML custom element to correctly dither an image giving pixel-perfect crisp results on all displays
MIT License
176 stars 2 forks source link

Support ordered dithering? #9

Closed evadecker closed 1 year ago

evadecker commented 1 year ago

Hey! Having a lot of fun implementing things with this little script and I'm enjoying the results. Thanks for writing this!

Would it be possible to add ordered/Bayer dithering as an option?

Ordered dithering produces "worse" results than Atkinson dithering because of the visible cross-hatch effect, but some of us (me) think that effect is cool :)

And on the plus side, ordered dithering is very fast to execute.

image image image
andrewstephens75 commented 1 year ago

Thank you for your suggestion. I am interested to hear what you have implemented with this component.

Unfortunately I will probably not be adding ordered dithering myself, as Atkinson dithering meets my needs. Maybe the next time I do a big update I will squeeze it in but for now I am marking this as won't fix.

That said, if somebody wants to pick this up as a quick project, modifying the ditherworker.js file for other types of dithering should not be too difficult.