How perfect pixel collision

Hi,

I convert my swf (platform game) to html5 and I would like to know if with two picture we can create a collision per perfect pixel ?
Picture 1 (just graphic)
Picture 2 (collision)

Thank you

My guess is you’ll have to do it yourself. Maybe like this: