1

I have a png image with an object on transperent background. This is shown in a browser.

When user hovers PNG image, there is a hover event in javascript. Is it possible to determine if mouse pointer is over transparent area of the PNG image or not?

1 Answer 1

1

In the canvas-enabled browsers yes. You can draw your image on the canvas and then get the color and transparence of the certain pixel.

Sign up to request clarification or add additional context in comments.

1 Comment

Can I draw multiple PNG images on canvas and determine which one of them is hovered(ignoring transparent area of each one)?

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.