aaron4osu — 2013-03-05T20:17:22-05:00 — #1
I was asked to build something similar to the app on these pages:
It lets the user upload a picture of themselves and then you can choose different eyeglass frames to see how they would look on you. I'm guessing the HTML5 canvas api would be a good place to start on this. The initial version of this doesn't have to be as intricate as this one. Maybe to start I could have the user upload a picture, then choose eyeglass frame which can be dragged and dropped onto the face. I've looked for some demos and tutorials but can't find anything similar. Any ideas on where to get started. Not sure what terms to even search for on this.
I realize this is pretty vague but I'm just looking to find a foothold on this project to get started.
pullo — 2013-03-06T01:42:58-05:00 — #2
I'm in a rush, but I just saw your question, so sorry for the short reply.
As you say, you'll need to look into the canvas API.
I helped someone in the JS forum construct something (vaguely) similar last year.
If you look at my answer it might at least point you in the right direction.
Hope that helps a little.
aaron4osu — 2013-03-06T06:38:01-05:00 — #3
pullo — 2013-03-06T06:50:15-05:00 — #4
aaron4osu — 2013-03-06T18:15:51-05:00 — #5
That's perfect. I didn't even think about the photobooth type apps as a starting point.
After just a few minutes I created a couple of versions with the mustache switched out for some glasses.
Here is a version with the beautiful bar refaeli
and a version that uses the user's camera:
both work fine in chrome but not firefox or safari. Neither the draggable aspect or the photo capture work. Is it just not supported in these browsers? How much work needs to be done to get them working in the current generation of browsers for firefox and safari.
pullo — 2013-03-07T07:03:40-05:00 — #6
The draggable aspect should work.
It is implemented using jQuery UI draggable and that works in all major browsers.
I just tried your first demo (with Bar Refaeli) and that worked just fine in FF 19.0.1
As for the webcam API, that is still quite experimental.
Here's an overview of what's currently possible: http://caniuse.com/stream
Maybe you also want to check out: http://www.iandevlin.com/blog/2012/06/html5/filtering-a-webcam-using-getusermedia-and-html5-canvas
If I was you, I would allow users with browsers which support this feature to make us of it and have a photo upload as a fall back.
I'm afraid I won't be able to participate much more in this discussion, as I am off on vacation for two and a half weeks tomorrow morning.
aaron4osu — 2013-03-07T07:33:29-05:00 — #7
I'll check out those resources. Thanks again and go enjoy your vaca