The easy option is to use sprites and define collision polygons outlining the actual shape in the image.
The harder option is detecting if the clicked pixel is transparent or opaque with a Drawing Canvas. On click pick all objects under the mouse cursor and start analyzing them from top to bottom (on z-axis). Put a small DrawingCanvas (like 2*2px) in the mouse position, paste one object, save snapshot, read pixel. If it's transparent, repeat this again for the object below etc., until you find the object with opaque pixel.