其实就是水印啦
- //session_start();
- header("Content-type: image/png"); //声明图片
- //$image = imagecreate(417, 294); //创建图片大小
- $image = imagecreatefrompng("cj.png");
- $admin = imageCreatefrompng("admin.png");
- $wfilew=imagesx($image);//取得图片的宽
- $wfileh=imagesy($image);//取得图片的高
- $waterw=imagesx($admin);//取得水印图片的宽
- $waterh=imagesy($admin);//取得水印图片的高
- //$imgbg = imagecolorallocate($image,30, 30, 30); //图片背景色彩
- //imagefill($image, 10, 10, $imgbg);
- $colorBlack = imagecolorallocate($image, 0, 0, 0);
- $colorBlacks = imagecolorallocate($image, 144, 144, 144);
- imagettftext($image, 20, 0,270, 250, $colorBlack, "simkai.ttf", "吕滔");
- imagettftext($image, 12, 0,230, 424, $colorBlacks, "arial.ttf", "420528198602344812");
- imagettftext($image, 12, 0,290, 450, $colorBlacks, "arial.ttf", "PHP100-20100001");
- imagettftext($image, 12, 0,260, 477, $colorBlacks, "arial.ttf", "PHP100-20100001");
- imagecopy($image, $admin, 550, 350, 0, 0, $waterw,$waterh);
- //imagestring("2.jpg",2,3,10,$waterstring,$colorBlack);
- //$_SESSION['lvtao']=$waterstring;
- imagepng($image);
- ?>
-
-
-
-
-
-
-
- //$email = 'user@lvtao.net';
- //$domain = strstr($email, '@');
- //echo $domain; // prints @lvtao.net'
- ?>
复制代码
|