Pil:python Imaging Library (image Processing Standard gallery)

Source: Internet
Author: User

Installing PIL

Mac or Linux installation command: sudo easy_install PIL

If error: Fatal error: ' freetype/fterrors.h ' File not found

Mac depends on the FreeType link change problem, resolved as follows:

Ln-s/usr/local/include/freetype2/usr/local/include/freetype

sudo easy_install-u pil

If a problem occurs: decoder JPEG not available

Uninstall your PIL

Download libjpeg:http://www.ijg.org/files/jpegsrc.v7.tar.gz

Install Libjpeg:

$ tar zxvf jpegsrc.v7.tar.gz $ cd jpeg-7 $./configure--enable-shared--enable-static $ make $ sudo make install< /c2>

Download pil:http://effbot.org/downloads/imaging-1.1.7.tar.gz

Edit setup.py, set:

Jpeg_root = Libinclude ("/usr/local")

Zlib_root = Libinclude ("/usr/local")

Installing PIL

$ python setup.py build $ sudo python setup.py install--optimize=1 $ python Selftest.py-run the selftest to confirm PIL   is

Restart Idle

Use examples to refer to:

Instance

For more information about PIL, please refer to the PIL official documentation:

http://effbot.org/imagingbook/

QRCode: Generate two-dimensional code

Installing Qrcode:sudo Easy_install QRCode

Test code (AT command line input): QR "Test" > Test.png

Pil:python Imaging Library (image Processing Standard gallery)

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.