1
A
回答
2
你应该能够做到这一点只需通过设置内容类型为“图像/ PNG”和图标链接REF设置PHP脚本生成的图标
$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);
0
为什么不使用netpbm的ppmtowinicon程序? GD - > file(xbm) - > file(ppm) - > file(ico) - > php stream,content-type = image/ico。
+3
请解释... – 2010-09-08 00:35:58
相关问题
- 1. PHP GD图像 - 输出动画GIF
- 2. GD imagefilter没有图像输出
- 3. php gd脚本不能正确输出图片
- 4. 在php中使用GD进行图像处理和输出
- 5. PHP GD给出错误
- 6. PHP GD图像视角
- 7. 用PHP拼接图像GD
- 8. PHP,GD,图像处理
- 9. PHP GD图像不合并
- 10. Php Gd旋转图像
- 11. php gd图像类型
- 12. php GD图像质量差
- 13. php gd图像质量
- 14. PHP的图像标题输出显示
- 15. PHP保存并输出GD Lib图像 - 相对和绝对路径
- 16. PHP图像GD库直到循环完成才输出视觉效果
- 17. 如何强制只使用PHP的GD输出?
- 18. PHP GD - 输出和保存之间的性能/时间差
- 19. PHP GD图书馆 - 显示图像
- 20. PHP输出图像发出
- 21. 与GD和PHP
- 22. PHP GD GRAYSCALE
- 23. PHP GD库imagecopyresized()
- 24. PHP GD库imagecopyrezised()
- 25. Dynamic backgroundimages PHP GD
- 26. php gd扩展
- 27. PHP GD - 空格
- 28. 使用PHP GD
- 29. 绘制锦标赛括号(PHP&GD)
- 30. PHP GD读出原始像素数据
如果你这样做为favicon,作为PNG输出可能会工作正常=) – mkoistinen 2010-09-07 23:47:15
SO已经涵盖了这一点,看起来像:http://stackoverflow.com/questions/2628114/convert-png-file-to-ico-with-php – mkoistinen 2010-09-07 23:49:01