convert -trim yourimage.png
That's all there is to it, very simple, clean and quick!
imagemagick, trim, automatically, linux, convert, yourimage, png,