加入收藏 | 设为首页 | 会员中心 | 我要投稿 安卓应用网 (https://www.0791zz.com/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 编程开发 > PHP > 正文

php imagecreatetruecolor()函数

发布时间:2020-05-30 19:21:25 所属栏目:PHP 来源:互联网
导读:php imagecreatetruecolor()函数用于创建一个新的真彩色图像。 本文章向大家介绍php imagecreatetruecolor()函数的基本使用方法和实例,需要的朋友可以参考一下。

imagecreatetruecolor - 创建一个新的真彩色图像。

语法

PHP imagecreatetruecolor()函数具有以下语法。

resource imagecreatetruecolor ( int $width,int $height )

参数

PHP imagecreatetruecolor()函数具有以下参数。

width - 图像宽度。

height - 图像高度。

返回值

成功时返回图像资源标识符,错误时返回FALSE。

实例

/*

http://www.manongjc.com/article/1752.html

作者:脚本之家教程

*/

header ('Content-Type: image/png');

$im = @imagecreatetruecolor(120,20) or die('Cannot Initialize new GD image stream');

$text_color = imagecolorallocate($im,233,14,91);

imagestring($im,1,5,'A Simple Text String',$text_color);

imagepng($im);

imagedestroy($im);

?>

(编辑:安卓应用网)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读