Php: Image processing

Source: Internet
Author: User
: 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.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.