Created
December 9, 2016 10:18
-
-
Save shafi2263/ba0eefb866afd93eb4f825dba4147a48 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python3 | |
from PIL import Image, ImageDraw, ImageFont | |
img = Image.new('RGB',(300,200),(255,255,255)) | |
draw = ImageDraw.Draw(img) | |
text = u"আমি দেখছি অনেক কিছুই" | |
fontdir = '/usr/share/fonts' | |
fontfile = ImageFont.truetype("/home/shafi/Downloads/BenSenHandwriting.ttf",24) #use a bengali font of choice | |
draw.text((50,100), text, fill='blue',font=fontfile) | |
img.save('imagetext.jpg') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment