Browse Source

文件上传

yeshihao 1 năm trước cách đây
mục cha
commit
e1ab1ab0db
1 tập tin đã thay đổi với 2 bổ sung4 xóa
  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;
 	}