It’s roughly the same solution in C2. Only the canvas plugin there makes it too slow to scan the pixels.
A tilemap with 1x1 tiles is the simplest way to work with physics, chipmunk or even just constructs collision system.
In c2 I’ve used js to copy the pixels of a sprites image to a c2 array. It dips into the runtime though and won’t work with minifying unless it was made into a plugin. It would look different for c3 but I don’t use that. Besides the canvas in c3 provides access to pixels anyway.
An alternate to 1x1 tiles with a tilemap is something called image tracing, or basically taking a raster image and converting it to vector. Then you’d set the collision polygon to that from js.
Or instead of messing with js at all you could take the image of the maze, open it in something like Inkscape, convert it to vectors (it’s a one click thing there), then save it into a simple to parse format like stl.
Then in construct add events to load the file and create a bunch of sprites stretched as lines to make up the edges.