Skip to main content

Python Imaging Library (fork)

Project description

Pillow

Pillow is the “friendly” PIL fork. PIL is the Python Imaging Library. Pillow was started for and is currently maintained by the Plone community. But it is used by many other folks in the Python web community, and probably elsewhere too.

Introduction

The fork author’s goal is to foster packaging improvements via:

  • Publicized development and solicitation of community support.

  • Exploration of packaging problems within the fork, most noticably via adding setuptools support but also via clean up & refactoring of packaging code.

Why a fork?

PIL is currently not setuptools compatible. Please see http://mail.python.org/pipermail/image-sig/2010-August/006480.html for a more detailed explanation. Also, PIL’s current release/maintenance schedule is not compatible with the various & frequent packaging issues that have occured.

What about image code bugs?

Please report any non-packaging related issues here first:

Then open a ticket here:

and provide a link to the first ticket so we can track the issue(s) upstream. This project does not aim to fix image code bugs, but if we can track them properly we may consider it. (And the image code could potentially be wholesale replaced when the next PIL release comes out.)

Documentation

The API documentation included with PIL has been converted (from HTML) to reStructured text (via pandoc) and is now hosted by readthedocs.org.

What follows is the original PIL README.

Python Imaging Library

Introduction

The Python Imaging Library (PIL) adds image processing capabilities to your Python environment. This library provides extensive file format support, an efficient internal representation, and powerful image processing capabilities.

This source kit has been built and tested with Python 2.0 and newer, on Windows, Mac OS X, and major Unix platforms. Large parts of the library also work on 1.5.2 and 1.6.

The main distribution site for this software is:

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

That site also contains information about free and commercial support options, PIL add-ons, answers to frequently asked questions, and more.

Development versions (alphas, betas) are available here:

http://effbot.org/downloads/

The PIL handbook is not included in this distribution; to get the latest version, check:

http://www.pythonware.com/library/

For installation and licensing details, see below.

Support Options

Commercial Support

Secret Labs (PythonWare) offers support contracts for companies using the Python Imaging Library in commercial applications, and in mission- critical environments. The support contract includes technical support, bug fixes, extensions to the PIL library, sample applications, and more.

For the full story, check:

http://www.pythonware.com/products/pil/support.htm

Free Support

For support and general questions on the Python Imaging Library, send e-mail to the Image SIG mailing list:

image-sig@python.org

You can join the Image SIG by sending a mail to:

image-sig-request@python.org

Put “subscribe” in the message body to automatically subscribe to the list, or “help” to get additional information. Alternatively, you can send your questions to the Python mailing list, python-list@python.org, or post them to the newsgroup comp.lang.python. DO NOT SEND SUPPORT QUESTIONS TO PYTHONWARE ADDRESSES.

Software License

The Python Imaging Library is

Copyright (c) 1997-2009 by Secret Labs AB Copyright (c) 1995-2009 by Fredrik Lundh

By obtaining, using, and/or copying this software and/or its associated documentation, you agree that you have read, understood, and will comply with the following terms and conditions:

Permission to use, copy, modify, and distribute this software and its associated documentation for any purpose and without fee is hereby granted, provided that the above copyright notice appears in all copies, and that both that copyright notice and this permission notice appear in supporting documentation, and that the name of Secret Labs AB or the author not be used in advertising or publicity pertaining to distribution of the software without specific, written prior permission.

SECRET LABS AB AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL SECRET LABS AB OR THE AUTHOR BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.

Build instructions (all platforms)

For a list of changes in this release, see the CHANGES document.

  1. If you’re in a hurry, try this:

    $ tar xvfz Imaging-1.1.7.tar.gz
    $ cd Imaging-1.1.7
    $ python setup.py install

    If you prefer to know what you’re doing, read on.

  2. Prerequisites.

    If you need any of the features described below, make sure you have the necessary libraries before building PIL.

    feature

    library

    JPEG support

    libjpeg (6a or 6b)

    http://www.ijg.org http://www.ijg.org/files/jpegsrc.v6b.tar.gz ftp://ftp.uu.net/graphics/jpeg/

    PNG support

    zlib (1.2.3 or later is recommended)

    http://www.gzip.org/zlib/

    OpenType/TrueType support

    freetype2 (2.3.9 or later is recommended)

    http://www.freetype.org http://freetype.sourceforge.net

    CMS support

    littleCMS (1.1.5 or later is recommended) http://www.littlecms.com/

    If you have a recent Linux version, the libraries provided with the operating system usually work just fine. If some library is missing, installing a prebuilt version (jpeg-devel, zlib-devel, etc) is usually easier than building from source. For example, for Ubuntu 9.10 (karmic), you can install the following libraries:

    sudo apt-get install libjpeg62-dev
    sudo apt-get install zlib1g-dev
    sudo apt-get install libfreetype6-dev
    sudo apt-get install liblcms1-dev

    If you’re using Mac OS X, you can use the ‘fink’ tool to install missing libraries (also see the Mac OS X section below).

    Similar tools are available for many other platforms.

  3. To build under Python 1.5.2, you need to install the stand-alone version of the distutils library:

    http://www.python.org/sigs/distutils-sig/download.html

    You can fetch distutils 1.0.2 from the Python source repository:

    svn export http://svn.python.org/projects/python/tags/Distutils-1_0_2/Lib/distutils/

    For newer releases, the distutils library is included in the Python standard library.

    NOTE: Version 1.1.7 is not fully compatible with 1.5.2. Some more recent additions to the library may not work, but the core functionality is available.

  4. If you didn’t build Python from sources, make sure you have Python’s build support files on your machine. If you’ve down- loaded a prebuilt package (e.g. a Linux RPM), you probably need additional developer packages. Look for packages named “python-dev”, “python-devel”, or similar. For example, for Ubuntu 9.10 (karmic), use the following command:

    sudo apt-get install python-dev

  5. When you have everything you need, unpack the PIL distribution (the file Imaging-1.1.7.tar.gz) in a suitable work directory:

    $ cd MyExtensions # example
    $ gunzip Imaging-1.1.7.tar.gz
    $ tar xvf Imaging-1.1.7.tar
  6. Build the library. We recommend that you do an in-place build, and run the self test before installing:

    $ cd Imaging-1.1.7
    $ python setup.py build_ext -i
    $ python selftest.py

    During the build process, the setup.py will display a summary report that lists what external components it found. The self- test will display a similar report, with what external components the tests found in the actual build files:

    --------------------------------------------------------------------
    Pillow 1.5 ( PIL fork based on PIL 1.1.7 ) SETUP SUMMARY
    --------------------------------------------------------------------
    platform  darwin 2.6.6 (r266:84292, Nov 26 2010, 16:24:16)
      [GCC 4.2.1 (Apple Inc. build 5664)]
    --------------------------------------------------------------------
    --- TKINTER support available
    --- JPEG support available
    --- ZLIB (PNG/ZIP) support available
    *** FREETYPE2 support not available
    *** LITTLECMS support not available
    --------------------------------------------------------------------

    Make sure that the optional components you need are included.

    If the build script won’t find a given component, you can edit the setup.py file and set the appropriate ROOT variable. For details, see instructions in the file.

    If the build script finds the component, but the tests cannot identify it, try rebuilding all modules:

    $ python setup.py clean
    $ python setup.py build_ext -i
  7. If the setup.py and selftest.py commands finish without any errors, you’re ready to install the library:

    $ python setup.py install

    (depending on how Python has been installed on your machine, you might have to log in as a superuser to run the ‘install’ command, or use the ‘sudo’ command to run ‘install’.)

Additional notes for Mac OS X

On Mac OS X you will usually install additional software such as libjpeg or freetype with the “fink” tool, and then it ends up in “/sw”. If you have installed the libraries elsewhere, you may have to tweak the “setup.py” file before building.

Additional notes for Windows

On Windows, you need to tweak the ROOT settings in the “setup.py” file, to make it find the external libraries. See comments in the file for details.

Make sure to build PIL and the external libraries with the same runtime linking options as was used for the Python interpreter (usually /MD, under Visual Studio).

Note that most Python distributions for Windows include libraries compiled for Microsoft Visual Studio. You can get the free Express edition of Visual Studio from:

http://www.microsoft.com/Express/

To build extensions using other tool chains, see the “Using non-Microsoft compilers on Windows” section in the distutils handbook:

http://www.python.org/doc/current/inst/non-ms-compilers.html

For additional information on how to build extensions using the popular MinGW compiler, see:

http://mingw.org (compiler) http://sebsauvage.net/python/mingw.html (build instructions) http://sourceforge.net/projects/gnuwin32 (prebuilt libraries)

Changelog

1.7.8 (2012-11-01)

1.7.7 (2012-04-04)

  • UNDEF more types before including windows headers [mattip]

1.7.6 (2012-01-20)

  • Bug fix: freetype not found on Mac OS X with case-sensitive filesystem [gjo]

  • Bug fix: Backport fix to split() after open() (regression introduced in PIL 1.1.7). [sfllaw]

1.7.5 (2011-09-07)

  • Fix for sys.platform = “linux3” [blueyed]

  • Package cleanup and additional documentation [aclark]

1.7.4 (2011-07-21)

  • Fix brown bag release [aclark]

1.7.3 (2011-07-20)

  • Fix : resize need int values, append int conversion in thumbnail method [harobed]

1.7.2 (2011-06-02)

  • Bug fix: Python 2.4 compat [aclark]

1.7.1 (2011-05-31)

  • More multi-arch support [SteveM, regebro, barry, aclark]

1.7.0 (2011-05-27)

  • Add support for multi-arch library directory /usr/lib/x86_64-linux-gnu [aclark]

1.6 (12/01/2010)

  • Bug fix: /usr/x11/include should be added to include_dirs not library_dirs [elro]

  • Doc fixes

1.5 (11/28/2010)

  • Module and package fixes

1.4 (11/28/2010)

  • Doc fixes

1.3 (11/28/2010)

  • Add support for /lib64 and /usr/lib64 library directories on Linux

  • Doc fixes

1.2 (08/02/2010)

  • On OS X also check for freetype2 in the X11 path [jezdez]

  • Doc fixes [aclark]

1.1 (07/31/2010)

  • Removed setuptools_hg requirement

  • Doc fixes

1.0 (07/30/2010)

Release history Release notifications | RSS feed

This version

1.7.8

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

Pillow-1.7.8.zip (410.7 kB view details)

Uploaded Source

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

Pillow-1.7.8-py2.7-win-amd64.egg (904.7 kB view details)

Uploaded Egg

Pillow-1.7.8-py2.7-win32.egg (821.2 kB view details)

Uploaded Egg

Pillow-1.7.8-py2.6-win-amd64.egg (906.5 kB view details)

Uploaded Egg

Pillow-1.7.8-py2.6-win32.egg (823.0 kB view details)

Uploaded Egg

Pillow-1.7.8-py2.5-win32.egg (815.1 kB view details)

Uploaded Egg

Pillow-1.7.8-py2.4-win32.egg (818.0 kB view details)

Uploaded Egg

File details

Details for the file Pillow-1.7.8.zip.

File metadata

  • Download URL: Pillow-1.7.8.zip
  • Upload date:
  • Size: 410.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for Pillow-1.7.8.zip
Algorithm Hash digest
SHA256 907f5342b1df1d277dcc10df2aeabc61099e5a07e0676b9fcd1bb7379890c0ee
MD5 41d8688d4db72673069a6dc63b5289d6
BLAKE2b-256 89ace90ae7f39d78ec10c0861915a7792c6486a90c8909942aef5fcb437dbf84

See more details on using hashes here.

File details

Details for the file Pillow-1.7.8-py2.7-win-amd64.egg.

File metadata

File hashes

Hashes for Pillow-1.7.8-py2.7-win-amd64.egg
Algorithm Hash digest
SHA256 4bc0484b56f9d6ac84f75c5aa932f7bd3ca64c9c38b651d1d79867c6305d41b6
MD5 85de8d32d823b57c1c75ec4b508a515f
BLAKE2b-256 23a9e6b5418a64b637b43d54ce62d4aacbe698d0ac28a3643dc076dcc2930ff8

See more details on using hashes here.

File details

Details for the file Pillow-1.7.8-py2.7-win32.egg.

File metadata

File hashes

Hashes for Pillow-1.7.8-py2.7-win32.egg
Algorithm Hash digest
SHA256 a9d6005f695fe6cdde284d4d3e2b7641afefb499f58f57b9cf45c37bee9ce3a0
MD5 85305954c63bf1a9f5a7158c12d08654
BLAKE2b-256 6daa01916d2acea70921253858c1763e7dbb9fe6226f1b54ac036405d31dc3c8

See more details on using hashes here.

File details

Details for the file Pillow-1.7.8-py2.6-win-amd64.egg.

File metadata

File hashes

Hashes for Pillow-1.7.8-py2.6-win-amd64.egg
Algorithm Hash digest
SHA256 c77931adb1bbd02d207783cd74e813050267a103d37e165df9426721af5640a4
MD5 97da0db19e46a4352efccc78f10c21b1
BLAKE2b-256 d6316e49de7ab34b613eb42b28d3c4cba9a14d9ab622d7f9f5f536e843c04667

See more details on using hashes here.

File details

Details for the file Pillow-1.7.8-py2.6-win32.egg.

File metadata

File hashes

Hashes for Pillow-1.7.8-py2.6-win32.egg
Algorithm Hash digest
SHA256 900b6e6115b484e373a3208d8c9b618be4a29de159335211e29038078d945bc1
MD5 1166d0b6618039709800f0d657b41fc7
BLAKE2b-256 7f43cb0f14cc4baad7d5ac2f32337c3d49e19a27d2b57ace66b1d1845be15043

See more details on using hashes here.

File details

Details for the file Pillow-1.7.8-py2.5-win32.egg.

File metadata

File hashes

Hashes for Pillow-1.7.8-py2.5-win32.egg
Algorithm Hash digest
SHA256 ac21ec0287c0e8af7a85fa326052b6c1ca5ec4e73eecfdd0d0258520b2d397c4
MD5 9536d023e93381bc030d00e39494c663
BLAKE2b-256 46711937fa84473e5786f397156ae19160c7e4d32eee5d5d4d3dd840f140dc85

See more details on using hashes here.

File details

Details for the file Pillow-1.7.8-py2.4-win32.egg.

File metadata

File hashes

Hashes for Pillow-1.7.8-py2.4-win32.egg
Algorithm Hash digest
SHA256 b760f442b180753684522f011dc0e24c1de0c68845d4bd64c59319fe5ffa630a
MD5 d5fd7f05ab481f9c991774ae35e9e709
BLAKE2b-256 658ea429b8530f6e3c831102036c3406afce8eac31c79ed83889c2dd7941537c

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page