I'm turning a cartoon image into a stencil ~~cartoon template (I'm stuck with my English here - I mean the paper with holes that let the paint through)~~.

This is the original image:

[![Yellow submarine cartoon](https://i.stack.imgur.com/yiSRw.png)](http://img4.wikia.nocookie.net/__cb20140720092438/legendsofthemultiuniverse/images/1/10/Yellow-Submarine-Header.png)

I simplified it, so that the white and yellow areas can be separated:

![submarine yellow template](https://i.stack.imgur.com/xKGtk.png)

But the final product that is printed should look like this:

![word yellow using amelia font](https://i.stack.imgur.com/TJjGs.png)

That is, the yellow parts should be surrounded with black dashed line and then deleted/hidden. The knife will then cut wherever the dashed lines are.

I have no idea how to achieve that. I need a program to make a path around the image's alpha channel. Then make this path dashed.

Do you have any idea?