4 ms·
What are the legitimate uses for a webpage to "read" the content of a canvas element?
by ballenf 9y ago
What are the legitimate uses for a webpage to "read" the content of a canvas element?
- bjackman 9y agoOne example: applying an effect to an image using custom JS. I also once used this as a fun way to arrange the repeated string "FILE NOT FOUND" in the shape of the characters "404", using the system's native font.
- humblebee 9y agoA trivial use case would be to save a drawing the user has created as a jpg/png and allow the user to download it.
- syrrim 9y agoI've used it in the past to prerender components on a secondary canvas, before combining them together on the main canvas. There might be a better way of doing this though.
- yoklov 9y agoMany games will want to, both for plain canvas or for webgl.