php简单创建图片实例
php创建图片教程,我们在编程时经常会看到用php写图片,验证码等,下面是一个简单的php创建图片实例代码:
<?php $height = 300; $width = 300; $im = ImageCreateTrueColor($width, $height); $white = ImageColorAllocate ($im, 255, 255, 255); $blue = ImageColorAllocate ($im, 0, 0, 64); ImageFill($im, 0, 0, $blue); //ImageLine($im, 0, 0, $width, $height, $white); ImageString($im, 10, 100, 120, 'Hello,PHP', $white); Header ('Content-type: image/png'); ImagePng($im); ImageDestroy($im);
本文地址:http://www.phprm.com/tuxiang/fs4499.html
转载随意,但请附上文章地址:-)