In learning python image processing, tell silly
PIL
andPillow
, so simple sort out the difference between the two.
One,PIL
PIL
The full name is: Python Imaging Library.
PIL
It is a powerful and convenient python image processing library with very powerful functions. It was once regarded as the de facto image processing standard library of the python platform, but it will no longer be supported after Python 2.7 .
PIL
Official website:
http://pythonware.com/products/pil/
two,Pillow
Pillow
It is PIL
a derivative branch based on the module fork, but has now developed into a PIL
more dynamic image processing library than itself.
Pillow
Friendly support python3, pypi
the latest version is currently available Pillow 7.2.0
.
Pillow
Official document address:
https://pillow.readthedocs.io/en/stable/
python3 installation pillow
:
pip install Pillow
tip:
Pillow
andPIL
cannot coexist in the same environment.Pillow
Please uninstall before installationPIL
.
Simple to use Pillow
:
# 从Pillow导入Image模块
from PIL import Image
# 打开图片bride.jpg
im = Image.open("bride.jpg")
# 显示图片
im.rotate(45).show()
It is here
from PIL
that may make many newcomers wonder. Although it ispillow
, the way to import the package is still the samefrom PIL
.
Image
Justpillow
one of many modules. Other modules and corresponding documents refer to the official website:https://pillow.readthedocs.io/en/stable/reference/index.html
That's it, PIL
and the Pillow
introduction is over!
END.
Some of my articles will be published on the public account for the first time. Wechat readers can search for: [ Programmer's Day ], interested friends can follow and support, thank you!
Every attention and praise are great support and encouragement. Finally, thank you very much for reading.