I think should be trivial, on current supported browsers at least.
[0]: https://developer.mozilla.org/en-US/docs/Web/API/HTMLCanvasE...