Use PHP code to generate images on webpages,

Source: Internet
Author: User

Use PHP code to generate images on webpages,

The code is very simple, so there is not much nonsense here,

<? Php/*** Created by PhpStorm. * User: Administrator * Date: 2015/6/29 * Time: 21:25 */header ('content-type: image/png '); // you can specify mime type $ img = imagecreate (400,300 ); // set the image pixel imagecolorallocate ($ img, 255,255,255); // color the image imageellipse ($ img, 200,200, 50, 50, imagecolorallocate ($ img, 0, 0 )); // draw the image on the image with a center point of 200,200. The width and height are 50, 50 imagepng ($ img). // set the image format to PNG.

The effect is as follows:

The above is all the content of this article. I hope you will like it.

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.