I'm newbie to canvas programming in javascript. I just need an idea how to achieve this problem.
Problem:
I want to place another image, it can be a logo/text according to curveness in background image. For example
This is simple image without logo/text. The only thing which i did until now is to load one image on top of another. Now I'm stuck don't know how to get curveness of background image at specific place like explained below.
this is the sample code.
var canvas = document.getElementById("myCanvas");
var ctx = canvas.getContext("2d");
var img=new Image();
img.onload = function() {
ctx.drawImage(img,150,0,500,500); }
img.src="images/image.png";
var logoImg=new Image();
logoImg.onload = function() {
ctx.drawImage(logoImg,185, 115,80,70);
}
logoImg.src="images/sanm.png";
After placing logo on different places, the logo adopt itself according to curveness of shirt.
Is it achievable using Javascript. I just want an idea even references to resources will be appricated.