Python image processing: the difference between PIL and Pillow

In learning python image processing, tell silly PILand Pillow, so simple sort out the difference between the two.

One,PIL

PILThe full name is: Python Imaging Library.

PILIt 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 .

PILOfficial website:

http://pythonware.com/products/pil/

two,Pillow

PillowIt is PILa derivative branch based on the module fork, but has now developed into a PILmore dynamic image processing library than itself.

pillow

PillowFriendly support python3, pypithe latest version is currently available Pillow 7.2.0.

PillowOfficial document address:

https://pillow.readthedocs.io/en/stable/

python3 installation pillow:

pip install Pillow

tip: Pillowand PILcannot coexist in the same environment. PillowPlease uninstall before installation PIL.

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 PILthat may make many newcomers wonder. Although it is pillow, the way to import the package is still the same from PIL.

ImageJust pillowone 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, PILand the Pillowintroduction 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.

Guess you like

Origin blog.csdn.net/pythontide/article/details/108792289