How do I dynamically insert images into mask and generate new jpg in JavaScript

386
May 27, 2017, at 10:15 PM

I want to be able to iterate through a database of users and, for each of their profile images, insert them into a predefined mask, and generate a new image. Basically, the mask will be a an image with some boilerplate text in it already, and there will be a hallow white square in the center where I will insert the user's profile image the server returns from the db, which will become a new jpg I can store.

How would I go about doing this? I have no idea where to begin. I imagine canvas could work but I am not sure.

Rent Charter Buses Company
READ ALSO
ubuntu pm2 command to run node-express site

ubuntu pm2 command to run node-express site

If I run my node-express site by hand it works great

412
Best practice for mean stack project

Best practice for mean stack project

I'm working on a MEAN stack projectIt has front-end for the web and app for mobile also has admin panel

251
How to wrap an event emitter with a Promise less weird-like?

How to wrap an event emitter with a Promise less weird-like?

I'm trying to wrap httpget with a Promise

305