Fill within the contour of an image?

Hey, so what i want to do is have an image, and fill within the contour of the image with circles of selected size. what would be the first step in doing this?

or is this even possible simply in AS3?