white background to transparent/alpha with imagemagick/mogrify
mogrify -fuzz 10% -transparent white myimage.png
fuzz helps converting white-ish colors, increase if not enough