$image = "vintdev.JPG"; // 原图
$imgstream = file_get_contents($image);
$im = imagecreatefromstring($imgstream);
$imgstream = file_get_contents($image);
$im = imagecreatefromstring($imgstream);
解决方案 »
- 高分求!网页中有大表格(200行以上)数据存储时的速度问题!(只能给100分,再开贴送分。)
- 大家有这本书的源文件吗?求一份!!
- PHP 类问题,为什么成员变量赋值了,输出时没有任何东西?
- 字符串分割的简单问题----在线等
- 如何加密通过URL打开的文档文件.
- PHP程序连接SQL中的一个表其中包含有(时间戳),想导出时把时间戳还原如何做?
- 有关分页
- 请问mysql数据库如何转换成sql server数据库而里面的数据不会丢失
- php文件点击链接时在URL中总是有PHPSESSID=% 如何取消Session Id号跟在后面
- 最近公司让我做一个足球彩票的网站,有兴趣的请各抒几建。谢谢
- sysdate 是什么意思啊???
- php修改数据库表的数据出错!求助
$im=imagecreate(286,93); //creat blank image object
imagefill($im,0,0,imagecolorallocate($im, 255, 255, 255));//image fill white
imagestring($im,5,20,35,"[DO NOT LEECH US RESOURCE!]",imagecolorallocate($im, 255, 0, 0));
imagepng($im); //show image
imagedestroy($im); //clear
exit;
}
/*=================*/$im = @imagecreatefrompng ("ipcover_org.png");//load image$color=imagecolorallocate($im, 0, 0, 0); //allocate color for font(black)imagestring($im,4,130,11,"[".$_SERVER["REMOTE_ADDR"]."]",$color); //show IP
imagestring($im,4,120,30,"[".show_browser()." / ".show_system()."]",$color); //show browser and systemimagepng($im); //show image
imagedestroy($im); //clear
你可以去研究一下GD库的方法
int imagecreatefrompng(string filename);
int imagecreatefromgif(string filename);
int imagecreatefromjpeg(string filename);参数 filename 可以是本地端的文件,也可以是网络的 URL 位址,
如:$im=imagecreatefromgif("images\\some.gif");接分!
查看效果图:
http://blog.csdn.net/ezdevelop/archive/2004/07/03/32933.aspx