1

PHP GDライブラリにファイルを出力させることは可能.icoですか?

似たような機能はありimagepngますか?

4

2 に答える 2

2

コンテンツタイプを「image/png」に設定し、アイコンを生成する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);
于 2010-09-08T02:02:48.070 に答える
0

netpbmのppmtowiniconプログラムを使用しないのはなぜですか?GD-> file(xbm)-> file(ppm)-> file(ico)-> phpストリーム、content-type = image/ico。

于 2010-09-07T23:49:06.200 に答える