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");
}
用法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");
}
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货