Skip to main content

Image manipulation library for media computation education

Project description

cImage - A simple image processing library for Python


If using Thonny, go to Tools -> Manage Packages, then enter cs20-image. This should install both the image module, and the Pillow module (so you can use any type of image you’d like).

If you are not using Thonny, copy to your site-packages directory, or just keep it in the same folder as the Python scripts that import it.


This image library is not going to give you fancy high performance operations on images. It allows you to read in an image and manipulate its pixels. Then you can save the new image to a file, or you can display the image in a window. Thats really about it, but its really all you want to do if you are teaching an introductory computer science course.

Image Types Supported

If you have PIL installed on your system (if you are using Thonny, this was installed along with the image module):

  • jpeg

  • gif

  • tiff

  • png

  • etc.

If you do not have PIL installed then you are stuck with GIF images only.


import image

win = image.ImageWin(480, 640, "Image Processing")
original_image = image.FileImage('lcastle.gif')

width = original_image.get_width()
height = original_image.get_height()
print(width, height)

my_image = original_image.copy()

for row in range(height):
    for col in range(width):
         v = my_image.get_pixel(col,row) = 255 - = 255 - = 255 -


Project details

Download files

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

Source Distribution

cs20-image-1.5.5.tar.gz (7.6 kB view hashes)

Uploaded Source

Built Distribution

cs20_image-1.5.5-py3-none-any.whl (9.6 kB view hashes)

Uploaded Python 3

Supported by

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