How do I create a mask with coordinates as VectorArray from an Image?

Godot Version

4.2.1

Question

G’day,

I am working on a game where you are required to draw on some outlines. Initially, I created the outlines manually with points saved in a PackedVector2Array. As it is obvious, it’s getting cumbersome to create more shapes.

I want to create the outlines from an image with white bg and black shapes on it. I want the shape to be in some kind of mask like the image editing software select a shape. I will then use that mask as a guidelines for the shapes which user can draw on.

Pleas help me out. Sorry if I am not clear enough, I am new to godot.