Please give more next time. Is this a top down 2D game? I will admit it.
There are several ways, depending on what you want to do and the level of detail.
If the numbers are almost all rectangles, you can just see if it is completely contained in them.
If not, you can use direct intersection algorithms, otherwise you could turn the map into one big path (so that the center of the path is either hollow or not) and use IsPointInPath (I would suggest making your own, although not using Canvas 'one) to see if all the key points of the player’s geometry are inside (or outside)
Finally, if you want to collide with a pixel , you have to make a simplified black map png (or something similar) of your level and use a ghost canvas, as I do for impact testing here. Then check a few pixels on the player’s silhouette and see if they are black. If any of them is not black, the player goes beyond!
source share