''' Purpose: draw axes over a user-requested selfie ''' from PIL import Image from image_support import get_selfie, show, get_size, set_pixel # important constants RGB_hot_pink = ( 248, 24, 148 ) # get id of interest reply = input( "Enter email id: " ) id = reply.strip().lower() # get selfie of interest img = get_selfie( id ) # get its dimensions w, h = get_size( img ) # determine mid x and y values mid_x = w // 2 mid_h = h // 2 # draw a horizontal axis over the image for x in range( 0, w ) : # examining pixels in a rightward sweep # get the current spot of interest for painting the axis spot = ( x, mid_h ) # set the img pixel at spot to color hot pink set_pixel( img, spot, RGB_hot_pink ) # display the marked-up selfie show( img ) # draw a vertical axis over the image for y in range( 0, h ) : # examining pixels in a rightward sweep # get the current spot of interest for painting the axis spot = ( mid_x, y ) # set the img pixel at spot to color hot pink set_pixel( img, spot, RGB_hot_pink ) # display the marked-up selfie show( img )