When i use this code,I can make a image out of text,but in a single line,
function writetext($image_path,$imgdestpath,$x,$y,$angle,$text,$font,$fontsize) {
$image=imagecreatefromjpeg("$image_path");
$height = imageSY($image);
$width = imageSX($image);
$color = imagecolorallocate($image,0,0,0);
$textwidth = $width;
imageTTFtext($image,$fontsize,$angle,$x,$y,$color,$font, $text );
ImageJPEG($image,$imgdestpath);
}
Please tell how to make this image in a multiline paragraph??
For each line you need new imageTTFtext function to be called with new value for $y
for example:
source