make dropshadow 10% transparent
This commit is contained in:
parent
6363327c5e
commit
94a610c1a6
@ -1,5 +1,5 @@
|
|||||||
import PySimpleGUI as sg
|
import PySimpleGUI as sg
|
||||||
from PIL import Image, ImageDraw, ImageFilter, ImageFont, ImageOps
|
from PIL import Image, ImageDraw, ImageEnhance, ImageFilter, ImageFont, ImageOps
|
||||||
from io import BytesIO
|
from io import BytesIO
|
||||||
|
|
||||||
# Globals
|
# Globals
|
||||||
@ -34,6 +34,10 @@ def update_image(original, title, subtitle):
|
|||||||
for i in range(6):
|
for i in range(6):
|
||||||
dropshadow = dropshadow.filter(ImageFilter.BLUR)
|
dropshadow = dropshadow.filter(ImageFilter.BLUR)
|
||||||
|
|
||||||
|
# make dropdhadow 10% transparent
|
||||||
|
alpha = dropshadow.split()[3]
|
||||||
|
alpha = ImageEnhance.Brightness(alpha).enhance(.9)
|
||||||
|
dropshadow.putalpha(alpha)
|
||||||
|
|
||||||
background = Image.alpha_composite(original, dropshadow)
|
background = Image.alpha_composite(original, dropshadow)
|
||||||
background = Image.alpha_composite(background, image)
|
background = Image.alpha_composite(background, image)
|
||||||
|
Loading…
Reference in New Issue
Block a user