php 简单创建图像
2008-11-24 12:02
309 查看
<?php
// set up image
$height = 200;
$width = 200;
$im = ImageCreateTrueColor($width, $height);
$white = ImageColorAllocate ($im, 255, 255, 255);
$blue = ImageColorAllocate ($im, 0, 0, 64);
// draw on image
ImageFill($im, 0, 0, $blue);
ImageLine($im, 0, 0, $width, $height, $white);
//ImageString($im, 4, 50, 150, 'Sales', $white);
// output image
Header ('Content-type: image/png');
ImagePng ($im);
// clean up
ImageDestroy($im);
?>
// set up image
$height = 200;
$width = 200;
$im = ImageCreateTrueColor($width, $height);
$white = ImageColorAllocate ($im, 255, 255, 255);
$blue = ImageColorAllocate ($im, 0, 0, 64);
// draw on image
ImageFill($im, 0, 0, $blue);
ImageLine($im, 0, 0, $width, $height, $white);
//ImageString($im, 4, 50, 150, 'Sales', $white);
// output image
Header ('Content-type: image/png');
ImagePng ($im);
// clean up
ImageDestroy($im);
?>
相关文章推荐
- php简单图像创建入门实例
- php简单图像创建入门实例
- php 一个简单的图像创建程序
- php创建一个最简单的soap服务端与客户端测试的实例
- PHP编实现程动态图像的创建
- 使用PHP来简单的创建一个RPC服务
- 3. PHP 创建图像、销毁图像 imagecreate 与 imagedestroy 函数
- php创建一个简单的留言板-上
- 一个简单的创建圆角图像的UIImage扩展实现
- (二)基于PHP——简单的WSDL的创建(WSDL篇)
- 基于qml创建最简单的android机图像采集程序
- 基于qml创建最简单的图像处理程序(1)-基于qml创建界面
- 创建多媒体APP 之 捕获图像:简单的拍录视频
- (二)基于PHP——简单的WSDL的创建(WSDL篇)
- PHP动态图像的创建
- [PHP] GD库(四):创建图像、销毁图像 imagecreate 与 imagedestroy 函数
- PHP动态图像的创建
- PHP编实现程动态图像的创建代码
- 使用 PHP 创建 PNG 图像
- php创建一个简单的留言板-下