feat: scripts
This commit is contained in:
parent
6feaf48ccf
commit
adc524c8fb
2 changed files with 5 additions and 3 deletions
|
|
@ -20,8 +20,10 @@ mask = np.zeros((height, width), dtype=np.uint8)
|
|||
|
||||
for y in range(height):
|
||||
for x in range(width):
|
||||
progress = (x + (height - y)) / (width + height)
|
||||
mask[y, x] = int(progress * 255)
|
||||
if y * width < x * height:
|
||||
mask[y, x] = 255
|
||||
else:
|
||||
mask[y, x] = 0
|
||||
|
||||
mask_img = Image.fromarray(mask, mode="L")
|
||||
result = Image.composite(light, dark, mask_img)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue