3 ms·
Not the API, I meant this functionality of rendering text on image, can this be done in JS only?
by zerop 5y ago
Not the API, I meant this functionality of rendering text on image, can this be done in JS only?
- motyar 5y agoYes its way easier in browser on front-end. But you need API for the things that happens off browser. Like if you want to create images inside your code.
- harperlee 5y agoIt can be done, but this is already done, so you can just pay with money instead of dev time.
- karqt 5y agoSure it can, and I'd say it's much cheaper to do it in JS than using API (with quite small quota, even for paid plans)
- finnx 5y agoYes, HTML5 Canvas. ctx.drawImage() ctx.fillText()
- udbhavs 5y agoOne barrier is if you load an image from a source that doesn't allow CORS the canvas becomes "tainted" and exports are blocked (https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_enabled_image https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_enabl...)
- dudus 5y agoYes but then you can't post it to social media as easily. Unless you export it as an image from JavaScript. This is good for social media managers that want to automate a lot of account posts.