日期:2014-05-17 浏览次数:20472 次
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");
}
------解决方案--------------------