擅长:python、mysql、java
<p>我自己不是PIL用户,但是快速搜索<a href="http://www.pythonware.com/library/pil/handbook/imageops.htm" rel="nofollow">the documentation</a>就会找到一个<code>invert</code>函数。</p>
<pre><code>ImageOps.invert(image) => image
Invert (negate) the image.
</code></pre>
<p>也许这就是你要找的?</p>