This script makes the image border wavy.
After applying the script, you can alter the margin color (white by default) by double-clicking the fill (forward) layer's thumbnail.