0
由於某種原因imagecreatetruecolor正在返回資源ID#53。任何想法爲什麼?使用PHP的GD庫,imagecreatetruecolor(100,100)返回資源ID#53?
由於某種原因imagecreatetruecolor正在返回資源ID#53。任何想法爲什麼?使用PHP的GD庫,imagecreatetruecolor(100,100)返回資源ID#53?
這就是它的工作原理。它不會直接輸出圖像,它首先會生成一個句柄,然後您可以對其進行操作:
$img_handle = imagecreatetruecolor(100, 100);
imagesetpixel($img_handle, $x=50, $y=50, $col=0x2255CC);
...
imagejpeg($img_handle, "output.jpeg");
最後一行然後生成最終圖像。
基於文檔,你期待什麼? – yhager 2011-05-11 23:09:24