用GD库往上面描绘 $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");接分!
$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