Commit
·
ae15258
1
Parent(s):
be9d1d3
Update app.py
Browse files
app.py
CHANGED
@@ -345,7 +345,7 @@ def generate_certificate(certificate_model, first_name, last_name):
|
|
345 |
|
346 |
im_temp = im.load()
|
347 |
background = Image.new("RGB", im.size, (255, 255, 255))
|
348 |
-
background.paste(im_temp, mask=
|
349 |
|
350 |
pdf = background.save("certificate"+".pdf")
|
351 |
|
|
|
345 |
|
346 |
im_temp = im.load()
|
347 |
background = Image.new("RGB", im.size, (255, 255, 255))
|
348 |
+
background.paste(im_temp, mask=im_temp.split()[3]) # 3 is the alpha channel
|
349 |
|
350 |
pdf = background.save("certificate"+".pdf")
|
351 |
|