使用imagamagick转换透明背景图像

try

convert image.gif -transparent white result.gif (or use result.png)

or if not perfectly white, then try

convert image.gif -fuzz XX% -transparent white result.gif

where the smaller the %, the closer to true white or conversely, the larger the %, the more variation from white is allowed to become transparent.

http://www.imagemagick.org/script/comma ... ransparent
http://www.imagemagick.org/script/comma ... s.php#fuzz
Fred's ImageMagick Scripts

convert dragon.gif    -resize 64x64  resize_dragon.gif