To finish this lab, follow the instructions below in sequence.
# Scale all colors by a constant (currently fixed to 0.5, which makes the picture "half bright") def scaleImage(picture): scaleFactor = 0.5 for p in getPixels(picture): valueRed = getRed(p) valueGreen = getGreen(p) valueBlue = getBlue(p) setRed(p, valueRed * scaleFactor) setGreen(p,valueGreen * scaleFactor) setBlue(p, valueBlue * scaleFactor)
>>> filename = pickAFile() >>> pic = makePicture(filename) >>> scaleImage(pic) >>> show(pic)
>>> writePictureTo(pic,r"Z:\lab3.jpg")
submit 1710 lab03 lab03.pyNote: You must do all the above steps correctly for receiving full credit for this lab.