Playing Video from file¶. It is same as capturing from Camera, just change camera index with video file name. Also while displaying the frame, use appropriate time for cv2.waitKey.If it is too less, video will be very fast and if it is too high, video will be slow (Well, that is how you can display videos in slow motion). 25 milliseconds will be OK in normal cases. PIL: Python Image Library is the de facto image processing standard library of Python platform. PIL is very powerful, but API is very simple and easy to use. Because PIL only supports Python 2.7 and is out of repair, a group of volunteers created a compatible version based on PIL. Apr 21, 2010 I'm using Python 2.6.5 (MacPorts install) to which I've added py26-pil by building/installing it from source. My idea version is Maya-IU-95.54 In idea I can edit and run a program that uses the Image library just fine, but I get an 'Unresolved Reference' hint at the 'import Image' statment and no code completion in the editor. Oct 07, 2016 The Python Imaging Library or PIL allowed you to do image processing in Python. The original author, Fredrik Lundh, wrote one of my favorite Python blogs when I first started learning Python. However PIL’s last release was way back in 2009 and the blog also stopped getting updated. Fortunately, there were some other Python folks Continue reading An Intro to the Python Imaging Library.
Install JPEG library:
Install PIL:
Update found more recent version of PIL at http://hg.effbot.org/pil-2009-raclette
clean up any existing builds by running
sudo rm -Rf build
edit setup.py and find JPEG_ROOT = None
and replace it with
JPEG_ROOT = libinclude('/usr/local/lib')
save setup.py file
sudo python setup.py build
at this point you should be able to run python selftest.py
and not get any errors related to JPEG
I see following results when I run it (ignoring ImageMath error at this point):
Mac Python Can't Find Pil Library Download
And now it's time to install it

sudo python setup.py install
Run python selftest.py
again after installation and you should see something along the lines:
Mac Python Can't Find Pil Library List
You are done! To test type python
to get into python interpreter then enter following commands:

you shouldn't see any errors