indersein
6 days ago
183
2
General

Add text in image

Posted 6 days ago by indersein

Hi any one please help me for add text to image using php

header("Content-type:image/jpeg");

	$image  = imagecreatefromjpeg("image/photo.jpeg");

	$font = "TCCEB.TFF";
	$color = imagecolorallocate($image, 87, 110, 121);
	 $x = 100;
	 $y = 100;

	imagettftext($image, 100, 0, $x,$y,$color,$font,'This is testing');

     imagejpeg($image);

This is my code but not working

Please sign in or create an account to participate in this conversation.