Reputation: 1760
Curious to hear other people's ideas.
I would like to have this scenario...
So flash was the first thing that sprung to mind but I would like to avoid that if poss ( and keep things iPad friendly) so I guess that leaves html5/ css3 / JavaScript and probably most importantly html canvas.
I would prefer to avoid any thing like java etc and keep this to simple web technologies ?
I have had a quick google but nothing seemed to jump.
Suggestions welcome!!
Upvotes: 2
Views: 924
Reputation: 100200
You can do it with canvas, specifically clipping path:
var img = new Image();
var context = canvas.getContext('2d');
img.onload = function(){
context.beginPath();
context.moveTo(10,10);
context.lineTo(300,200);
context.lineTo(100,150);
context.clip();
context.drawImage(img, 0,0)
}
img.src = 'example.png';
Of course you'll need to write some UI that lets user set the points. You can either get the image directly from <input>
via input.files[0]
and FileReader
API and then send it with XHR2, or get it after uploading it to the server.
Upvotes: 4