[ÐÂÊÖÉÏ·]Åú´¦ÀíÐÂÊÖÈëÃŵ¼¶Á[ÊÓƵ½Ì³Ì]Åú´¦Àí»ù´¡ÊÓƵ½Ì³Ì[ÊÓƵ½Ì³Ì]VBS»ù´¡ÊÓƵ½Ì³Ì[Åú´¦Àí¾«Æ·]Åú´¦Àí°æÕÕƬÕûÀíÆ÷
[Åú´¦Àí¾«Æ·]´¿Åú´¦Àí±¸·Ý&»¹Ô­Çý¶¯[Åú´¦Àí¾«Æ·]CMDÃüÁî50Ìõ²»ÄÜ˵µÄÃØÃÜ[ÔÚÏßÏÂÔØ]µÚÈý·½ÃüÁîÐй¤¾ß[ÔÚÏß°ïÖú]VBScript / JScript ÔÚÏ߲ο¼
·µ»ØÁÐ±í ·¢Ìû

[ÎÊÌâÇóÖú] PythonΪʲôͼƬÉÏûÓÐÏÔʾºº×Ö°¡

ÎÒÏëÔÚͼƬ×óÉϽÇÏÔʾ88888888£¬ÔËÐнá¹ûʲô¶¼Ã»Óа¡£¬ÊÇʲôԭÒò£¿
  1. import datetime
  2. import re
  3. #from PIL import Image
  4. from PIL import Image, ImageDraw, ImageFont
  5. image = Image.new(mode='RGB',size=(640, 480),color=(0,0,0))
  6. weiqi = datetime.datetime.now().strftime("%Y%m%d") + '.png'
  7. # print (datetime.datetime.now().strftime("%Y%m%d"))
  8. # print (weiqi)
  9. img=Image.open('yi001.png')
  10. width = img.size[0]
  11. height = img.size[1]
  12. print (width)
  13. print (height)
  14. img = img.resize((int(width*0.8), int(height*0.8)), Image.ANTIALIAS)
  15. image.paste(img, (120,40))
  16. draw = ImageDraw.Draw(img)
  17. font = ImageFont.truetype(font='simfang.ttf', size=10)
  18. draw.text(xy=(0,0), text='88888888', fill=(255, 255, 255), font=font)
  19. image.save(weiqi, 'png')
  20. image.close()
¸´ÖÆ´úÂë

·µ»ØÁбí