|
|
@@ -60,10 +60,10 @@ class Image
|
|
|
$frontImageSource = imagecolorallocatealpha($image, 0, 0, 0, 127);
|
|
|
imagefill($image, 0, 0, $frontImageSource);
|
|
|
//生成文字透明背景板
|
|
|
- $fontImage = new \Grafika\Gd\Image($image, '', imagesx($image), imagesy($image), ImageType::JPEG);
|
|
|
+ $fontImage = new \Grafika\Gd\Image($image, '', imagesx($image), imagesy($image), ImageType::PNG);
|
|
|
|
|
|
//设置文字颜色
|
|
|
- $Color = new Color('#000000');
|
|
|
+ $Color = new Color('#cccccc');
|
|
|
$editor->text($fontImage, $waterText, $fontSize, $fontX, $fontY, $Color, $fontPath, $angle);
|
|
|
if ($waterText2) {
|
|
|
$editor->text($fontImage, $waterText2, $fontSize, $fontX + $fontSize, $fontY + $fontSize, $Color, $fontPath, $angle);
|
|
|
@@ -73,8 +73,6 @@ class Image
|
|
|
$editor->blend($backdropImage, $fontImage, 'overlay', 1, 'center');
|
|
|
// 保存图片
|
|
|
$editor->save($backdropImage, $filePath);
|
|
|
- dump(1);
|
|
|
- die();
|
|
|
return true;
|
|
|
}
|
|
|
|