...
|
...
|
@@ -200,20 +200,20 @@ class UploadController extends RestUserBaseController |
|
|
//3.使用固定的公式计算新的宽高
|
|
|
$logourlsx = 300;
|
|
|
$logourlsy = 300;
|
|
|
//4.生成目标图像资源
|
|
|
//4.生成目标图像资源 微信头像
|
|
|
$logourl_small = imagecreatetruecolor($logourlsx,$logourlsy);
|
|
|
$color = imagecolorallocate($logourl_small, 255, 120, 43);
|
|
|
imagefill($logourl_small, 0, 0, $color);
|
|
|
imageColorTransparent($logourl_small, $color);
|
|
|
$color1 = imagecolorallocate($logourl_small, 255, 120, 43);
|
|
|
imagefill($logourl_small, 0, 0, $color1);
|
|
|
imageColorTransparent($logourl_small, $color1);
|
|
|
//5.进行缩放
|
|
|
imagecopyresampled($logourl_small,$logourl,0,0,0,0,$logourlsx,$logourlsy,$logourlfx,$logourlfy);
|
|
|
|
|
|
|
|
|
$erweimaurl = imagecreatefromstring($xmlstr);
|
|
|
$image_3 = imageCreatetruecolor(imagesx($beijing),imagesy($beijing));
|
|
|
$color = imagecolorallocate($image_3, 255, 255, 255);
|
|
|
imagefill($image_3, 0, 0, $color);
|
|
|
imageColorTransparent($image_3, $color);
|
|
|
$color2 = imagecolorallocate($image_3, 255, 120, 43);
|
|
|
imagefill($image_3, 0, 0, $color2);
|
|
|
imageColorTransparent($image_3, $color2);
|
|
|
imagecopyresampled($image_3,$beijing,0,0,0,0,imagesx($beijing),imagesy($beijing),imagesx($beijing),imagesy($beijing));
|
|
|
//字体颜色
|
|
|
$white = imagecolorallocate($image_3, 255, 255, 255);
|
...
|
...
|
@@ -238,11 +238,11 @@ class UploadController extends RestUserBaseController |
|
|
//3.使用固定的公式计算新的宽高
|
|
|
$sx = $fx/1.8;
|
|
|
$sy = $fy/1.8;
|
|
|
//4.生成目标图像资源
|
|
|
//4.生成目标图像资源 小程序码
|
|
|
$small = imagecreatetruecolor($sx,$sy);
|
|
|
/*$color = imagecolorallocate($small, 255, 120, 43);
|
|
|
imagefill($small, 0, 0, $color);
|
|
|
imageColorTransparent($small, $color);*/
|
|
|
$color3 = imagecolorallocate($small, 255, 120, 43);
|
|
|
imagefill($small, 0, 0, $color3);
|
|
|
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);
|
...
|
...
|
|