0

私の問題は、Codeigniter で php ライブラリを使用して画像を作成できないことです。

たとえば、以下の php.net のサンプル コードを使用しています。

 header("Content-Type: image/png");
 $im = @imagecreate(110, 20) or die("Cannot Initialize new GD image stream");
 $background_color = imagecolorallocate($im, 0, 0, 0);
 $text_color = imagecolorallocate($im, 233, 14, 91);
 imagestring($im, 1, 5, 5,  "A Simple Text String", $text_color);
 imagepng($im);
 imagedestroy($im);

このコードは私に壊れたイメージを与えます。次のような gd_info() を使用して gd オプションを調査しました。

[GD Version] => bundled (2.0.34 compatible)
[FreeType Support] => 1
[FreeType Linkage] => with freetype
[T1Lib Support] => 
[GIF Read Support] => 1
[GIF Create Support] => 1
[JPEG Support] => 1
[PNG Support] => 1
[WBMP Support] => 1
[XPM Support] => 
[XBM Support] => 1
[JIS-mapped Japanese Font Support] => 

XAMPPローカルサーバーの最新バージョンのCodeigniterで使用しています。コードまたはローカル サーバーの何が問題になっていますか?

4

0 に答える 0