samedi 3 janvier 2015

Extract part of image by its image map coordinates and display it inside a canvas


I have an image which is being displayed by a canvas and I have coordinates like this



428,361,432,374,475,399,470,472,420,
494,400,486,328,461,183,409,176,386,
178,356,182,345,270,309,192,288,072,
257,069,228,069,219,077,212,112,205,
133,207,185,201,213,203,277,215,291,
220,298,222,323,225,388,235,418,244,
412,269,393,312,387,332,388,349,407,
356,414,360


which are in an <area> tag format.


What I want to do is to extract that area from my image and display it (that extracted area) inside another canvas.


How can I do that?


Thanks





Aucun commentaire:

Enregistrer un commentaire