Changes

Jump to navigation Jump to search
1,173 bytes added ,  18:22, 1 June 2017
no edit summary
Line 191: Line 191:  
<br />
 
<br />
 
Note: This setting works for '''Kali''' and '''Raspbian''' OS.
 
Note: This setting works for '''Kali''' and '''Raspbian''' OS.
 +
 +
== Install Python Pillow ==
 +
 +
wget http://www.zlib.net/zlib-1.2.11.tar.gz
 +
wget http://www.ijg.org/files/jpegsrc.v8c.tar.gz
 +
extract both: tar -xzvf ...
 +
./configure
 +
./make
 +
./make install
 +
both...
 +
pip install Pillow
 +
<nowiki>accepted
 +
 +
 +
You have to re-install PIL and also install the needed libraries as well as link them manually. This answer is based on this blog post for a regular ubuntu PIL installation and this askubuntu question, where it is explained how to compile the jpeg encoding:
 +
 +
### uninstall PIL
 +
sudo pip uninstall pil
 +
 +
### download and compile the JPEG library
 +
wget http://www.ijg.org/files/jpegsrc.v8c.tar.gz   
 +
tar xvfz jpegsrc.v8c.tar.gz
 +
cd jpeg-8c
 +
./configure --enable-shared --prefix=$CONFIGURE_PREFIX
 +
make
 +
sudo make install
 +
 +
### link the libraries correctly - RASPBERRY PI ONLY
 +
sudo ln -s /usr/lib/arm-linux-gnueabi/libjpeg.so /usr/lib
 +
sudo ln -s /usr/lib/arm-linux-gnueabi/libfreetype.so /usr/lib
 +
sudo ln -s /usr/lib/arm-linux-gnueabi/libz.so /usr/lib
 +
 +
### install rest of the libraries, as well as freetrype and zlib
 +
sudo apt-get install libjpeg-dev libfreetype6 libfreetype6-dev zlib1g-dev
 +
 +
### re-install PIL
 +
sudo pip install pil</nowiki>

Navigation menu