$img = imagecreatetruecolor(16, 16);
$blue = imagecolorallocate($im, 100, 100, 255);
imagefill($im, 0, 0, $blue);
header('Content-type: image/png');
/*
or if it needs to be the icon content type
header('Content-type: image/ico');
*/
imagepng($im);
imagedestroy($im);
you should be able to do it simply by setting the content type to 'image/png' and setting the the icon link ref to the php script that generates the icon
$img = imagecreatetruecolor(16, 16);
$blue = imagecolorallocate($im, 100, 100, 255);
imagefill($im, 0, 0, $blue);
header('Content-type: image/png');
/*
or if it needs to be the icon content type
header('Content-type: image/ico');
*/
imagepng($im);
imagedestroy($im);
发布评论
评论(2)
您应该能够简单地通过将内容类型设置为“image/png”并将图标链接引用设置为生成图标的 php 脚本来完成此操作
you should be able to do it simply by setting the content type to 'image/png' and setting the the icon link ref to the php script that generates the icon
为什么不使用netpbm的ppmtowinicon程序? GD->文件(xbm)->文件(ppm) ->文件(ico)-> php 流,内容类型 = image/ico.
Why not to use netpbm's ppmtowinicon program? GD -> file(xbm) -> file(ppm) -> file(ico) -> php stream, content-type = image/ico.