php图像函数 imagecreatetruecolor()和imagecreate()的区别
来源:互联网 发布:管家婆软件怎样做库存 编辑:程序博客网 时间:2024/06/07 16:26
imagecreatetruecolor(int x,int y)建立的是一幅大小为 x和 y的黑色图像(默认为黑色),如想改变背景颜色则需要用填充颜色函数imagefill($img,0,0,$color);
imagecreate 新建一个空白图像资源,用imagecolorAllocate()添加背景色
上面两个函数只不过是一个功能的两种方法
具体用法见以下两种方法:
<?php
$img = imagecreatetruecolor(100,100);
$color = imagecolorAllocate($img,200,200,200);
imagefill($img,0,0,$color);
header('content-type:image/jpeg');
imagejpeg($img);
?>
<?php
$img = imagecreate(100,100);
$color = imagecolorallocate($img,200,200,200);
header('content-type:image/jpeg');
imagejpeg($img);
?>
- php图像函数 imagecreatetruecolor()和imagecreate()的区别
- php图像函数 imagecreatetruecolor()和imagecreate()的区别
- php图像函数 imagecreatetruecolor()和imagecreate()的区别
- imagecreatetruecolor()和imagecreate()的区别
- imagecreatetruecolor()与imagecreate()生成图像时的背景色
- 3. PHP 创建图像、销毁图像 imagecreate 与 imagedestroy 函数
- Call to undefined function imagecreatetruecolor() imageCreate() 的gd库解决办法
- PHP图像处理之imagecreate、imagedestroy函数介绍
- [PHP] GD库(四):创建图像、销毁图像 imagecreate 与 imagedestroy 函数
- PHP error: Call to undefined function imagecreate()的解决办法
- PHP发生Call to undefined function imagecreate()错误的解决办法
- PHP发生Call to undefined function imagecreate()错误的解决办法
- PHP发生Call to undefined function imagecreate()错误的解决办法
- imagecreatetruecolor背景颜色的改变
- PHP函数isset和empty的区别
- PHP strstr() 和 strpos() 函数的区别
- PHP函数addslashes和mysql_real_escape_string的区别
- php语言结构和函数的区别
- c++小点回忆
- Servlet3.1规范翻译——概览 (转)
- Java学习笔记 - java多线程
- Percona-Toolkit命令集合工具,Mysql不可或缺的必备利器之一
- 求实数绝对值 gcc
- php图像函数 imagecreatetruecolor()和imagecreate()的区别
- 自动化测试web控件定位方法
- IOS 自动填充视图控件长宽 笔记
- 批量更改dblink的地址
- FCKEditor2.6.3配合Java的使用步骤
- “百度之星”程序设计大赛试题解答(Java实现)
- 关于namenode安全模式
- 基于ARM的RAM存储器接口设计
- Javascript两种方法实现数秒自动关闭弹窗