8.11. Image Processing on Your OwnΒΆ

If you want to try some image processing on your own, outside of the textbook you can do so using the cImage module. You can download cImage.py from The github page . If you put cImage.py in the same folder as your program you can then do the following to be fully compatible with the code in this book.

import cImage as image
img = image.Image("myfile.gif")


One important caveat about using cImage.py is that it will only work with GIF files unless you also install the Python Image Library. The easiest version to install is called Pillow. If you have the pip command installed on your computer this is really easy to install, with pip install pillow otherwise you will need to follow the instructions on the Python Package Index page. With Pillow installed you will be able to use almost any kind of image that you download.


This workspace is provided for your convenience. You can use this activecode window to try out anything you like.

Next Section - 8.12. Glossary