first, make sure to start PHP gd2 Library; start Extension=php_gd2.dll in php.ini;
$im = Imagecreatetruecolor (+); $red =
Imagecolorallocate($im,255,0,0); //imageellipse ($im, 40,20,20,20, $red); //imageline ($im, 0,0,400,300, $red); //imagerectangle ($im, 10,20,300,200, $red); //imagefilledrectangle ($im, 20,100,360,150, $red); //imagearc ($im, 200,150,300,220,40,250, $red); //imagefilledarc ($im, 200,150,300,220,40,250, $red, img_arc_pie); //$srcImage =imagecreatefromjpeg ("123.jpg"); //$srcImageInfo =getimagesize ("123.jpg"); // //imagecopy ($im, $srcImage, 10,5,50,60, $srcImageInfo [0], $srcImageInfo [1]); //imagestring ($im, 22,5,8, ' Hello World ', $red); $str=' Hello Word, Tianjin Harbour City '; //msyhbd.ttf To support Chinese fonts, Copy to directory in c:windows/fonts;
imagettftext($im, $red, "Msyhbd.ttf", $STR);
Header ( "Content-type:image/png");
imagepng ($im);
Imagedestroy ($im);
Copyright NOTICE: This article for Bo Master original article, without Bo Master permission not reproduced.
The above describes the PHP: image processing, including the aspects of the content, I hope that the PHP tutorial interested in a friend helpful.