https://code.csdn.net/snippets/176541
用法require 'class.ico.php';
$o = new Ico("favicon.ico"); //需要转换的图片
$index = "nsize";
foreach ($o->formats as $key => $val) {
    if ($val['header']['Width'] == 32 and $val['header']['Height'] == 64) {
        $index = $key;
        break;
    }
}
if ($index === "nsize") {
    print_r("没有相应的尺寸");
    die;
} else {
    imagegif($o->GetIcon($index), "favicon.png"); 
}