Omnibus commited on
Commit
16bc2e0
β€’
1 Parent(s): f04efc7

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -3
app.py CHANGED
@@ -214,8 +214,9 @@ def blur_im(img,bounds):
214
 
215
 
216
  #fontpath = "tamil/Latha.ttf"
217
- text = "New Text"
218
-
 
219
  #font = ImageFont.truetype(fontpath, 32)
220
  im = Image.fromarray(im)
221
  for bound in bounds:
@@ -225,7 +226,7 @@ def blur_im(img,bounds):
225
  w = int(p2[0]) - int(x)
226
  h = int(p2[1]) - int(y)
227
  draw = ImageDraw.Draw(im)
228
- draw.text((x+5, y+5),text, font = None)
229
  #img_tamil = np.array(img_pil)
230
  return im
231
 
 
214
 
215
 
216
  #fontpath = "tamil/Latha.ttf"
217
+ text = "New Text"
218
+ #fnt = ImageFont.truetype("Pillow/Tests/fonts/FreeMono.ttf", 40)
219
+ font = ImageFont.load("arial.pil", 40)
220
  #font = ImageFont.truetype(fontpath, 32)
221
  im = Image.fromarray(im)
222
  for bound in bounds:
 
226
  w = int(p2[0]) - int(x)
227
  h = int(p2[1]) - int(y)
228
  draw = ImageDraw.Draw(im)
229
+ draw.text((x+5, y+5),text, font = font, fill=(0,0,0))
230
  #img_tamil = np.array(img_pil)
231
  return im
232