Reputation: 3288
I have an application where users need to transmit data to each other (can't go through the server). I thought it might be nice to render an image from that data, and have them send that image (QR codes won't work for various reasons).
I came accross this github repo which looked promising, and implemented it, here.
The problem is, for various reasons, the output will be different for different browsers (and possibly OS's). Try it for yourself. Encode various messages in different browsers, and you'll see different base64 encoded results.
Is there any good solution to this? Can I implement a third party canvas library? Maybe use FileReader.readAsDataURL()?
Upvotes: 4
Views: 829
Reputation: 3288
Alright, in the end, I did have to use a 3rd party image processing library, and couldn't depend on the browser's canvas feature. Here's my solution :)
I built it on top of this image processing library.
Upvotes: 1