|
@@ -413,7 +413,11 @@ let zTool = {
|
|
|
ctx.drawImage(image, 0, 0);
|
|
|
// 添加水印文本
|
|
|
let size = Math.ceil(image.width*image.height /100000);
|
|
|
-
|
|
|
+ let proportion = Math.ceil(image.height / image.width)
|
|
|
+ console.log(proportion)
|
|
|
+ if(proportion>2){
|
|
|
+ size=size*0.5
|
|
|
+ }
|
|
|
ctx.font = `${size}px Arial`;
|
|
|
ctx.fillStyle = 'rgb(228,233,229)';
|
|
|
const watermarkText = name; // 水印文本
|