: This article mainly introduces php: Image Processing. if you are interested in the PHP Tutorial, you can refer to it. First, make sure to start the php gd2 Library; start extension = php_gd2.dll in php. ini;
Imagecreatetruecolor(1, 400,300); $ red =
Imagecolorallocate($ Im, 400,300, 0); // imageellipse ($ im, 20, 20, $ red); // imageline ($ im, $ 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, 50, 60, $ srcImageInfo [0], $ srcImageInfo [1]); // imagestring ($ im, 8, 'Hello World', $ red); $ str = 'Hello word, Tianjin Haigang city'; // msyhbd. ttf is a Chinese font that can be copied to a directory in C: WINDOWS/FONTS;
Imagettftext($ Im, 25, 10, 15,140, $ red, "msyhbd. ttf", $ str );
Header("Content-type: image/png ");
Imagepng($ Im );
Imagedestroy($ Im );
Copyright Disclaimer: This article is an original article by the blogger and cannot be reproduced without the permission of the blogger.
The above introduces php: image processing, including some content, hope to be helpful to friends who are interested in PHP tutorials.