Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>I know this is an old question, but I wanted to give my answer in case people run into the same problem as me.</p> <p>The builds by Christoph Gohlke are awesome, when they work. However for my win7 machine with python 2.7 and most importantly 64bit, there is no precompiled binary with PNG support (zlib support). The Pillow 64bit Binary on that page fails on easy_install and can't be installed on my machine.</p> <p>So if you want to solve this and the binary doesn't work you need to build Pillow your self with zlib support. To do this you need to download the latest Pillow source. Modify in setup.py the ZLIB_ROOT line to say: </p> <pre><code>ZLIB_ROOT = './zlib' </code></pre> <p>Now you have to build zlib for win64 bit as well, that's the tricky part. Download latest zlib source from their site (I tested on 1.2.5/1.2.8). Open visual studio command prompt for 64 bit (VERY IMPORTANT) My command prompt was called VS2012 x64 Cross Tools Command Prompt.</p> <p>Go to the zlib source dir and run:</p> <pre><code>nmake -f win32/Makefile.msc </code></pre> <p>If it doesnt work try:</p> <pre><code>nmake -f win32/Makefile.msc AS=ml64 LOC="-DASMV -DASMINF" OBJA="inffasx64.obj gvmat64.obj inffas8664.obj" </code></pre> <p>Now you should have in the source directory the following files:</p> <pre><code>zlib.h zconf.h zutil.h (not sure this is needed) zlib.lib zdll.lib </code></pre> <p>Copy them into the Pillow source directory, into a directory called "zlib" Compile Pillow using <code>"python setup.py build_ext -i"</code> Install Pillow using <code>"python setup.py install"</code></p> <p>Pillow should now work with ZLIB (png) support. If you have some older Pillow/PIL installations, you might need to manually copy the _imaging.pyd and _imagingmath.pyd to the package installation folder of your python or virtual environment, to make sure you have the newly compiled ones.</p> <p>You can now import _imaging and you have png support.</p> <p>You can also add Libjpeg in the same way, compiling it manually, if needed.</p> <p>Hope this helps anyone that encounters this problem.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload