Skip to content

Commit

Permalink
This is copy just for test
Browse files Browse the repository at this point in the history
  • Loading branch information
lulujianjie committed Apr 19, 2015
1 parent c39bfa5 commit b440d19
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 1 deletion.
18 changes: 17 additions & 1 deletion lulujianjie/0000/0000.py
Original file line number Diff line number Diff line change
@@ -1 +1,17 @@
print "hello python"
from PIL import Image,ImageDraw,ImageFont

def addNum(filePath):
img = Image.open(filePath)
size = img.size
fontSize = size[1] / 4
draw = ImageDraw.Draw(img)

ttFont = ImageFont.truetype("symbol.ttf", fontSize)
draw.text((size[0]-fontSize, 0), "6",(256,0,0), font=ttFont)
del draw
img.save('./result.jpg')
img.show()


if __name__ == '__main__':
addNum("image.jpg")
Binary file added lulujianjie/0000/image.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit b440d19

Please sign in to comment.