Threashold var implemented (for better text output)
This commit is contained in:
parent
7090589354
commit
a59f0515e8
@ -312,12 +312,15 @@
|
||||
|
||||
function showHiddenCanvas()
|
||||
{
|
||||
var threasholdRGB = 200;
|
||||
var threasholdAlpha = 100;
|
||||
|
||||
for(var y = 0; y < yMax; y++)
|
||||
{
|
||||
for(var x = 0; x < xMax; x++)
|
||||
{
|
||||
var p = hiddenCtx.getImageData(x, y, 1, 1).data;
|
||||
if((p[0] < 128 || p[1] < 128 || p[2] < 128) && p[3] > 128)
|
||||
if((p[0] < threasholdRGB || p[1] < threasholdRGB || p[2] < threasholdRGB) && p[3] > threasholdAlpha)
|
||||
{
|
||||
pixelBuffer[x+xMax*y] = 1;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user