From 3402d2f2a8bea8d6d7066a003a5ccfe884d933f8 Mon Sep 17 00:00:00 2001 From: "Marcus Str." Date: Tue, 4 Feb 2025 15:21:16 +0100 Subject: [PATCH] Another correction to farmland lines --- maskgen.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/maskgen.py b/maskgen.py index 15572a1..78017ec 100644 --- a/maskgen.py +++ b/maskgen.py @@ -269,7 +269,7 @@ class mstr_maskgen: lines = Image.new("RGBA", (2048,2048)) mask_pix = mask_img.load() pts = [] - for l in range(96, 201): + for l in range(21,51): p = ( randrange(0,2048), randrange(0,2048) ) pts.append(p) imgl = ImageDraw.Draw(lines) @@ -278,8 +278,9 @@ class mstr_maskgen: linepix = lines.load() for y in range(0, 2048): for x in range(0, 2048): + mp = mask_pix[x,y] lp = linepix[x,y] - if lp[3] > 0: + if lp[3] > 0 and mp[3] > 0: c = (0,0,0,255-lp[3]) mask_pix[x,y] = c