Signed Distance Field textures

Hello, i have been trying to find out how i can create a signed distance field texture from a png alpha map, but i cant figure out how to do it. If anyone knows how to do it either photoshop or another program it would be appreciated. Ive added some photos to show what i mean.