PIL是Python平台事實上的圖像處理標准庫,支持多種格式,並提供強大的圖形與圖像處理功能。
PIL
模塊全稱為 Python Imaging Library
,是python中一個免費的圖像處理模塊。
PIL(Python Imaging Library)是Python中一個強大的圖像處理庫,但目前其只支持到Python2.7
pillow是PIL的一個分支,雖是分支但是其與PIL同樣也具有很強的圖像處理庫。
安裝PIL
1.確認你的版本
2.如果是Python 2.7 直接 pip install PIL
3. 如果是Python 3.7 用 pip install pillow
4.打開pycharm導入模塊嘗試是否標紅
>>> from pil import Image >>> from PIL import Image Traceback (most recent call last): File "<stdin>", line 1, in <module> ModuleNotFoundError: No module named 'PIL' >>>
>>> import pil >>> import PIL Traceback (most recent call last): File "<stdin>", line 1, in <module> ModuleNotFoundError: No module named 'PIL'
pillow官網:
About pillow
Goals
The fork author’s goal is to foster and support active development of PIL through:
-
Continuous integration testing via GitHub Actions, AppVeyor and Travis CI
-
Publicized development activity on GitHub
-
Regular releases to the Python Package Index
License
Like PIL, Pillow is licensed under the open source HPND License
Why a fork?
PIL is not setuptools compatible. Please see this Image-SIG post for a more detailed explanation. Also, PIL’s current bi-yearly (or greater) release schedule is too infrequent to accommodate the large number and frequency of issues reported.
What about PIL?
Note
Prior to Pillow 2.0.0, very few image code changes were made. Pillow 2.0.0 added Python 3 support and includes many bug fixes from many contributors.
As more time passes since the last PIL release (1.1.7 in 2009), the likelihood of a new PIL release decreases. However, we’ve yet to hear an official “PIL is dead” announcement.
REF
https://www.jianshu.com/p/e8d058767dfa
https://www.cnblogs.com/chimeiwangliang/p/7127542.html
https://blog.csdn.net/bryant_meng/article/details/81299874
https://blog.csdn.net/bryant_meng/article/details/86185490