from PIL import Image, ImageEnhance

user_account_name = "Thomas.Li26"

def main():
    mode = input("Specify image editing mode. Type DEEPFRY, STRETCH, BRIGHTNESS, SHARPEN, or INVERT: ")
    if mode == "DEEPFRY":
        DEEPFRY()
    if mode == "STRETCH":
        STRETCH()
    if mode == "INVERT":
        INVERT()
    if mode == "BRIGHTNESS":
        BRIGHTNESS()
    if mode == "SHARPEN":
        SHARPEN()

def DEEPFRY():
    img = input("Insert the name of an image found in the Downloads folder (for example: Image.png): ")
    im = Image.open(r"C:\Users\{}\Downloads\{}".format(user_account_name, img))
    enhancer = ImageEnhance.Contrast(im)
    factor = float(input("Specify deepfry amount (0-100): "))
    im_output = enhancer.enhance(factor)
    im_output.save('more-contrast-image.png')
    im_output.show()

def STRETCH():
    img = input("Insert the name of an image found in the Downloads folder (for example: Image.png): ")
    im = Image.open(r"C:\Users\{}\Downloads\{}".format(user_account_name, img))
    factor = int(input("Specify width: "))
    factor2 = int(input("Specify height: "))
    im_output = im.resize((factor,factor2))
    im_output.save('more-contrast-image.png')
    im_output.show()

def INVERT():
    img = input("Insert the name of an image found in the Downloads folder (for example: Image.png): ")
    im = Image.open(r"C:\Users\{}\Downloads\{}".format(user_account_name, img))
    enhancer = ImageEnhance.Contrast(im)
    im_output = enhancer.enhance(-1)
    im_output.save('more-contrast-image.png')
    im_output.show()

def BRIGHTNESS():
    img = input("Insert the name of an image found in the Downloads folder (for example: Image.png): ")
    im = Image.open(r"C:\Users\{}\Downloads\{}".format(user_account_name, img))
    enhancer = ImageEnhance.Brightness(im)
    factor = float(input("Specify brightness amount: "))
    im_output = enhancer.enhance(factor)
    im_output.save('more-contrast-image.png')
    im_output.show()

def SHARPEN():
    img = input("Insert the name of an image found in the Downloads folder (for example: Image.png): ")
    im = Image.open(r"C:\Users\{}\Downloads\{}".format(user_account_name, img))
    enhancer = ImageEnhance.Sharpness(im)
    factor = float(input("Specify sharpening amount: "))
    im_output = enhancer.enhance(factor)
    im_output.save('more-contrast-image.png')
    im_output.show()

if __name__ == "__main__":
    main()

[((21, 15, 21, 40), 'PIL.ImageEnhance.Contrast', 'ImageEnhance.Contrast', ({(21, 37, 21, 39): 'im'}, {}), '(im)', False, 'from PIL import Image, ImageEnhance\n'), ((39, 15, 39, 40), 'PIL.ImageEnhance.Contrast', 'ImageEnhance.Contrast', ({(39, 37, 39, 39): 'im'}, {}), '(im)', False, 'from PIL import Image, ImageEnhance\n'), ((47, 15, 47, 42), 'PIL.ImageEnhance.Brightness', 'ImageEnhance.Brightness', ({(47, 39, 47, 41): 'im'}, {}), '(im)', False, 'from PIL import Image, ImageEnhance\n'), ((56, 15, 56, 41), 'PIL.ImageEnhance.Sharpness', 'ImageEnhance.Sharpness', ({(56, 38, 56, 40): 'im'}, {}), '(im)', False, 'from PIL import Image, ImageEnhance\n')]