Objective:
The most commonly used image processing library in Python is the PIL (pythonimaging Library), where the image class is a very important class in the PIL library, where instances can be loaded directly into the image file. The three methods of reading the processed image and getting the image through the fetching method.
One PIL version selection
From the online search, PIL official only 32-bit installation files, the installation will be prompted to find the Python installation path. The reason why the PIL library cannot be installed under 64-bit Win7 is that the PIL binary installation package provided by PIL official http://www.pythonware.com/products/pil/is 32-bit. The location of the 64-bit program and the 32-bit program to detect the registry is not the same: 64-bit programs detect Hkey_local_machinesoftwarepython, and 32-bit programs detect HKEY_LOCAL_ Machinesoftwarewow6432nodepython. If the python installed is 64-bit, the information is below Hkey_local_machinesoftwarepython, while the 32-bit program is HKEY_LOCAL_ Machinesoftwarewow6432nodepython below to find the Python installation information, results can not be found, so will hold the wrong.
There are unofficial 64-bit libraries on the Internet (official source code compiled), called Pillow. Pillow is an alternative version of PIL. Its website is: http://www.lfd.uci.edu/~gohlke/pythonlibs/.
There are 6 versions on this website, namely PILLOW-3.1.0-CP27-NONE-WIN32.WHL, PILLOW-3.1.0-CP27-NONE-WIN_AMD64.WHL, PILLOW-3.1.0-CP34-NONE-WIN32.WHL, PILLOW-3.1.0-CP34-NONE-WIN_AMD64.WHL, PILLOW-3.1.0-CP35-NONE-WIN32.WHL and PILLOW-3.1.0-CP35-NONE-WIN_AMD64.WHL.
According to my current situation, I downloaded the PILLOW-3.1.0-CP27-NONE-WIN32.WHL. This file is not an executable file and is described on the website and needs to be installed using the PIP tool.
-------------------------------------------------------------------------------------------------------
PIL (Python Imaging library) is a powerful and convenient image processing library for Python, and its fame is relatively large. However, only Python 2.7 is supported.
PIL Official website: http://www.pythonware.com/products/pil/
Pillow is a derived branch of PIL, but has now evolved into a more dynamic image processing library than PIL itself. Currently the latest version is 3.0.0.
Pillow's GitHub homepage: https://github.com/python-pillow/Pillow
Pillow documentation (corresponding to version v3.0.0): https://pillow.readthedocs.org/en/latest/handbook/index.html
Pillow document Chinese Translation (corresponding to version v2.4.0): http://pillow-cn.readthedocs.org/en/latest/
Python 3.x Installation Pillow
Installing pillow for Python is simple, using PIP or Easy_install as long as a single line of code.
Use PIP installation at the command line:
Pip Install Pillow
or use Easy_install installation at the command line:
Easy_install Pillow
When the installation is complete, use the From PIL import image to reference the library
Install Python's PiL library under Windows7