The Python binding of tclip.
实际使用中,通常不是从文件中读取图片并把图片写到文件,而是拿到在内存中的图片数据,并生成图片 数据直接返回。所以这就是为什么要加上tclip_on_buffer。
Install this package into your site-packages:
$ pip install git+git://github.com/tonyseek/python-tclip.git
And use it to process pictures
from tclip import TClip
clip = TClip(width=150, height=150)
clip.process_file("/path/to/input.jpg", "/path/to/output.jpg")