First we're going to calculate the
x and y distance between the mouse-pointer and the centre of the image.
The centre of the image is its top/left plus half its height/width.
var distance_x = target_x - (this.x + this.MyImg.width/2);
var distance_y = target_y - (this.y + this.MyImg.height/2);
Then we calculate the angle using some
trigonometry magic, specifically a special type of arc-tangent called
atan2 which is like a normal arctan but extended for game-coding.
Don't worry if you haven't studied this level of trigonometry yet -- just be happy the Greek's invented it 2000 years ago and it still works today.
this.angle = (Math.atan2(distance_y, distance_x) * 180 / Math.PI) + 90;
If you don't understand the trig, don't sweat it -- this stuff gets embedded in an object and just works. It's good to understand things, but trigonometry is a big area to get your head around, and if you're not already doing so, just accept it as alien magic and use it.
Move the mouse or slide your finger over the canvas.