5
我使用imageloadfont
函數來創建動態圖像。我將AARDV.TTF
字體文件作爲imageloadfont文件中的參數。下面的代碼我使用:在給圖像加載字體提供字體參數時出現錯誤
$im = imagecreatetruecolor(750,600);
$title = imagecolorallocate($im, 255, 240, 255);
$font = imageloadfont(JPATH_SITE.'/components/com_motivator/images/font/AARDV.TTF');
$text = "Some text here";
imagettftext($im, 20, 0, 15, 20, $title, $font, $text);
當上面的代碼運行,我得到一個錯誤信息
Warning: imageloadfont() [function.imageloadfont]: gd warning: product of memory allocation multiplication would exceed INT_MAX, failing operation gracefully
我該如何解決這個錯誤給我的任何想法
使用imagestring()得到相同的錯誤 – nilesh1006
這甚至不是錯誤的行。 – Lolmewn