I use the function imageloadfontto create a dynamic image. I pass the font file AARDV.TTFas a parameter in the imageloadfont file. Below is the code I'm using:
$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);
When this code works, I received an error message
Warning: imageloadfont() [function.imageloadfont]: gd warning: product of memory allocation multiplication would exceed INT_MAX, failing operation gracefully
How do I solve this error, give me some idea
source
share