Parcourir la source

Merge commit 'e1ab1ab0db3f2561dfd95a5e5d07d769d3cbe8c6' into prod-v1

Mark il y a 1 an
Parent
commit
89764aa3a7
1 fichiers modifiés avec 2 ajouts et 4 suppressions
  1. 2 4
      dyu/application/common/service/watermark/image/Image.php

+ 2 - 4
dyu/application/common/service/watermark/image/Image.php

@@ -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;
 	}