''' Solution to Problem 9. ''' from PIL import Image def legal( v ) : pass def offset( pixel, x, y, z ) : pass def shift( original, x, y, z ) : pass if ( __name__ == '__main__' ) : import url link = 'http://www.cs.virginia.edu/~cs1112/images/ml.png' original = url.get_image( link ) try : print( legal( -1 ), legal( 125 ), legal( 256 ) ) except : print( 'legal() blows up' ) try : print( offset( ( 25, 0, 200 ), 25, -50, 75 ) ) except : print( 'offset() blows up' ) try : im = shift( original, 25, -50, 75 ) im.show() except : print( 'shift() blows up' )