Skip to content

Commit

Permalink
Merge pull request #93 from Iulujianjie/master
Browse files Browse the repository at this point in the history
Hello,I want to join in this program.
  • Loading branch information
horx committed Apr 23, 2015
2 parents 215720b + 44d2b0d commit 55fb8cf
Show file tree
Hide file tree
Showing 7 changed files with 17 additions and 0 deletions.
Binary file added acwong00/0000/Thumbs.db
Binary file not shown.
Binary file modified acwong00/0000/finnal.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added agmcs/0000/Thumbs.db
Binary file not shown.
17 changes: 17 additions & 0 deletions lulujianjie/0000/0000.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
from PIL import Image, ImageDraw, ImageFont

im = Image.open('image.jpg')
w,h = im.size
font_size = h/4

draw = ImageDraw.Draw(im)
fnt = ImageFont.truetype ("Arial.ttf",font_size)

text_w,text_h = draw.textsize("8",font=fnt) # 给定文字message,返回所占像素(width,height)

draw.text((w-text_w,0), "8", fill=(255,0,0), font=fnt)#图片宽度减去字体宽度、要写的字符、颜色、字体


im.save('image_1.jpg')

#reference http://www.cnblogs.com/wei-li/archive/2012/04/19/2456725.html
Binary file added lulujianjie/0000/Thumbs.db
Binary file not shown.
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.
Binary file added lulujianjie/0000/image_1.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 55fb8cf

Please sign in to comment.