winterfeel / Pic2Text

A script to transform picture to text

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

###Pic2Text A script to transform picture to text, supporting Chinese.

Preview:
image ###Dependencies

  • Python 2.7
  • PIL or Pillow

###How to use If you wanna use your own font,copy the font file to your folder and edit the font name in line 27:

  ft = ImageFont.truetype("msyhbd.ttf",fontSize)

Then edit the last several lines of codes:

    textList = ['撒','啊','呵','王','一'];
	pic2Text('test.jpg',textList);

Remenber to sort characters by Density

###About 不灭的小灯灯
An individual developer
Blog:www.winterfeel.com

About

A script to transform picture to text


Languages

Language:Python 100.0%