Change Contents of the Bubble
Welcome to CS1315. Click on the python to add comments.

This page removed for FERPA compliance
View this PageEdit this Page (locked)Uploads to this PageHistory of this PageHomeRecent ChangesSearchHelp Guide

Template2

# Template to get and show a picture file;
# Loop through and process each pixel;
# Do something with new picture
def <function name>():
  #Part 1 - Get and show a picture file. REMOVEDose from Template1.
  file = '<file name>.jpg'
  picture = makePicture(file)
  show(picture) <or openPictureTool(picture)>
  
  #Part 2 - Loop through picture and process each pixel.	
  for pixel in getPixels(picture):
    <do something to each pixel>
  
  #Part 3 - Do something with new picture
  repaint(picture) 
  <or openPictureTool(picture), writePictureTo(picture, path)>


Links to this Page