Another correction to farmland lines

This commit is contained in:
Marcus Str. 2025-02-04 15:21:16 +01:00
parent fbb7112388
commit 3402d2f2a8

View File

@ -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