Spaces:
Runtime error
Runtime error
Update overlay.py
Browse files- overlay.py +8 -1
overlay.py
CHANGED
@@ -22,8 +22,15 @@ def textover(im,txt,inp):
|
|
22 |
out = toi.process(out,"Contact Card",font_fac=font_b,font_x=font_x,font_y=font_y,font_col="#000000",font_op=255)
|
23 |
|
24 |
return out
|
|
|
|
|
|
|
|
|
|
|
|
|
25 |
def custom_overlay(txt=None):
|
26 |
-
|
|
|
27 |
x,y = background.size
|
28 |
if x > y:
|
29 |
aa=y
|
|
|
22 |
out = toi.process(out,"Contact Card",font_fac=font_b,font_x=font_x,font_y=font_y,font_col="#000000",font_op=255)
|
23 |
|
24 |
return out
|
25 |
+
|
26 |
+
def background_image():
|
27 |
+
img_b = np.zeros([512,512,1],dtype=np.uint8)
|
28 |
+
img_b.fill(255)
|
29 |
+
img_b.save("background.png")
|
30 |
+
|
31 |
def custom_overlay(txt=None):
|
32 |
+
background_image()
|
33 |
+
background = Image.open("background.png")
|
34 |
x,y = background.size
|
35 |
if x > y:
|
36 |
aa=y
|