教程集 www.jiaochengji.com
教程集 >  脚本编程  >  php  >  正文 php 创建图片程序实例

php 创建图片程序实例

发布时间:2016-10-28   编辑:jiaochengji.com
教程集为您提供php 创建图片程序实例等资源,欢迎您收藏本站,我们将为您提供最新的php 创建图片程序实例资源

<?php
$height = 300;
$width = 300;
 
$image = ImageCreate($width, $height);
 
$grey = ImageColorAllocate($image, 125, 125, 125);
$blue = ImageColorAllocate($image, 0, 0, 255);
$red = ImageColorAllocate($image, 255, 0, 0);
 
ImageString ($image, 4, 50, 50, "Size 4 Font", $red);
ImageString ($image, 5, 50, 100, "Size 5 Font", $blue);
 
ImageLine($image, 0, 0, 300, 300, $blue);
 
 
header ("Content-type: image/png");
ImagePng($image);
ImageDestroy($image);
?>

您可能感兴趣的文章:
php 删除记录同时删除图片文件的代码
php绘图不显示图片怎么办
PHP采集远程图片的实例代码
php 创建图片程序实例
php实现图片缩放效果
php采集远程图片的思路与实现代码
php如何实现调整图片大小或创建缩略图
php不变形缩放图片
php多图上传怎么保存路径
php的readfile能读图片吗

[关闭]
~ ~