...
|
...
|
@@ -221,12 +221,12 @@ class UploadController extends RestUserBaseController |
|
|
$black = imagecolorallocate($image_3,255,255,255);
|
|
|
$font = ROOT_PATH . 'public'."/static/font-awesome/fonts/simkai.ttf"; //写的文字用到的字体。字体最好用系统有得,否则会包charmap的错,这是黑体
|
|
|
//imagettftext设置生成图片的文本
|
|
|
imagettftext($image_3,35,0,100,920,$black,$font,$nickname);//姓名
|
|
|
imagettftext($image_3,26,0,300,920,$black,$font,$position);//职称
|
|
|
imagettftext($image_3,26,0,100,980,$black,$font,$company);//公司
|
|
|
imagettftext($image_3,26,0,100,1040,$black,$font,$tel);//电话
|
|
|
imagettftext($image_3,26,0,100,1100,$black,$font,$email);//邮箱
|
|
|
imagettftext($image_3,26,0,440,1170,$black,$font,$tishi);//提示
|
|
|
//imagettftext($image_3,35,0,100,920,$black,$font,$nickname);//姓名
|
|
|
//imagettftext($image_3,26,0,300,920,$black,$font,$position);//职称
|
|
|
//imagettftext($image_3,26,0,100,980,$black,$font,$company);//公司
|
|
|
//imagettftext($image_3,26,0,100,1040,$black,$font,$tel);//电话
|
|
|
//imagettftext($image_3,26,0,100,1100,$black,$font,$email);//邮箱
|
|
|
//imagettftext($image_3,26,0,440,1170,$black,$font,$tishi);//提示
|
|
|
//imagecopymerge($image_3,$logourl_small, 240,250,0,0,$logourlsx,$logourlsy,100);//左,上,右,下,宽度,高度,透明度
|
|
|
//imagecopymerge($image_3,$youxiang, 50,350,0,0,imagesx($youxiang),imagesy($youxiang),100);//左,上,右,下,宽度,高度,透明度
|
|
|
//imagecopymerge($image_3,$dianhua, 50,390,0,0,imagesx($dianhua),imagesy($dianhua),100);//左,上,右,下,宽度,高度,透明度
|
...
|
...
|
@@ -245,7 +245,7 @@ class UploadController extends RestUserBaseController |
|
|
imageColorTransparent($small, $color3);
|
|
|
//5.进行缩放
|
|
|
imagecopyresampled($small,$erweimaurl,0,0,0,0,$sx,$sy,$fx,$fy);
|
|
|
imagecopymerge($image_3,$small, 450,875,0,0,imagesx($small),imagesy($small), 100);
|
|
|
//imagecopymerge($image_3,$small, 450,875,0,0,imagesx($small),imagesy($small), 100);
|
|
|
//生成图片
|
|
|
$name = time().rand(1000,9999);
|
|
|
imagepng($image_3,ROOT_PATH . 'public' . DS . 'upload/'.$name.'.png');//在浏览器上显示
|
...
|
...
|
|