From a0c0055c0f86d7da66ce9acd401d0a824c8eaca9 Mon Sep 17 00:00:00 2001
From: ciaochaos <1272777550@qq.com>
Date: Sun, 17 May 2020 20:14:58 +0800
Subject: [PATCH] =?UTF-8?q?C2=20=E6=A0=B7=E5=BC=8F=E8=B0=83=E6=95=B4?=
=?UTF-8?q?=E6=9B=9D=E5=85=89=E5=BA=A6=E4=B8=8E=E5=AF=B9=E6=AF=94=E5=BA=A6?=
=?UTF-8?q?=202?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/components/renderer/RendererResImage.js | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/components/renderer/RendererResImage.js b/src/components/renderer/RendererResImage.js
index deb0909..345ec6b 100644
--- a/src/components/renderer/RendererResImage.js
+++ b/src/components/renderer/RendererResImage.js
@@ -149,7 +149,7 @@ function getGrayPointList(params, size, black, white) {
let imageData = ctx.getImageData(x, y, 1, 1);
let data = imageData.data;
let gray = gamma(data[0], data[1], data[2]);
- if (Math.random() > ((gray / 255) - 0.5) * (contrast + 1) + 0.5 + exposure && ( x % 3 !== 1 || y % 3 !== 1 ) ) gpl.push();
+ if (Math.random() > ((gray / 255) + exposure - 0.5) * (contrast + 1) + 0.5 && ( x % 3 !== 1 || y % 3 !== 1 ) ) gpl.push();
}
}
resolve(gpl);