imagecreatetruecolor - 创建一个新的真彩色图像。
语法
PHP imagecreatetruecolor()函数具有以下语法。
resource imagecreatetruecolor ( int $width , int $height )
参数
PHP imagecreatetruecolor()函数具有以下参数。
- width - 图像宽度。
- height - 图像高度。
返回值
成功时返回图像资源标识符,错误时返回FALSE。
实例
<?php
/*
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, 5, \'A Simple Text String\', $text_color);
imagepng($im);
imagedestroy($im);
?> 继续阅读与本文标签相同的文章
-
日本技术贸易株式会社代表一行到全国技术转移转移公共服务平台调研交流
2026-05-15栏目: 教程
-
如果你的工资不足6千,这5个APP请收好,坚持学习,月薪翻倍很简单
2026-05-15栏目: 教程
-
Nervos 发布 CKB 共识协议白皮书
2026-05-15栏目: 教程
-
《工业主机安全防护技术现状与展望》
2026-05-15栏目: 教程
-
荣耀手机中的三个黑科技功能,手机保险箱,居然还有“后悔药”
2026-05-15栏目: 教程
