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