Image Processing

The images module allows students to load, transform, and save digital images. For example, the following Python program loads an image, displays it, converts it to grayscale, and displays the changes:

 

 

The Image class includes methods to

  • get the width of an image
  • get its height
  • get a pixel at a given position
  • modify a pixel at a given position
  • save an image to a file
  • create a copy (clone) of an image

Download the images module

View the images API