Spaces:
Running
on
CPU Upgrade
Running
on
CPU Upgrade
Commit
·
be9d1d3
1
Parent(s):
e183e91
Update app.py
Browse files
app.py
CHANGED
@@ -344,7 +344,7 @@ def generate_certificate(certificate_model, first_name, last_name):
|
|
344 |
d.text((1480, 1170), str(date.today()), fill="black", anchor="mm", font=date_font)
|
345 |
|
346 |
im_temp = im.load()
|
347 |
-
background = Image.new("RGB",
|
348 |
background.paste(im_temp, mask=png.split()[3]) # 3 is the alpha channel
|
349 |
|
350 |
pdf = background.save("certificate"+".pdf")
|
|
|
344 |
d.text((1480, 1170), str(date.today()), fill="black", anchor="mm", font=date_font)
|
345 |
|
346 |
im_temp = im.load()
|
347 |
+
background = Image.new("RGB", im.size, (255, 255, 255))
|
348 |
background.paste(im_temp, mask=png.split()[3]) # 3 is the alpha channel
|
349 |
|
350 |
pdf = background.save("certificate"+".pdf")
|