← Back to context

Comment by throwanem

1 day ago

The implementation is excellent, and could be slightly improved by giving a default name and .png extension to the downloaded file, by passing a value to the "download" property on the anchor. See https://developer.mozilla.org/en-US/docs/Web/API/HTMLAnchorE...

In his defence, that attribute has been available in browsers since March 2017 according to your link [1], whereas the most recent commit in the repo for the dithering tool was in March 2016 by the looks of it.

https://github.com/gazs/canvas-atkinson-dither

He’s still active on GitHub though, in other repos. Maybe he will accept a pull request? :)

[1]: https://developer.mozilla.org/en-US/docs/Web/API/HTMLAnchorE...