Advertisement
Guest User

Untitled

a guest
Apr 23rd, 2019
86
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.73 KB | None | 0 0
  1. #!/usr/bin/python
  2. # -*- coding: utf-8 -*-
  3.  
  4. import sys
  5. from math import sqrt
  6. import numpy as np
  7. from PIL import Image
  8.  
  9. ##########################
  10. #Segundo Trabalho de PDI#
  11. ##########################
  12.  
  13. def pegaPixel(imagem,i,j):
  14. width, height = imagem.size
  15. if((i>width) or (j>height)):
  16. return None
  17. pixel = imagem.getpixel((i,j))
  18. return pixel
  19.  
  20.  
  21.  
  22.  
  23.  
  24. if __name__ == "__main__":
  25.  
  26. fileInput = sys.argv[1]
  27. fileOutput = sys.argv[2]
  28.  
  29. while(True):
  30. imagem = abreImagem(fileInput)
  31. MenuSelect = input(
  32. " _____ _ ____ _ _ _ _ _ _ \n"
  33. +"| _ |___ ___ ___ ___ ___ ___ ___ _____ ___ ___| |_ ___ | \|_|___|_| |_ ___| | _| |___ |_|_____ ___ ___ ___ ___ ___ \n"
  34. +"| __| _| . | _| -_|_ -|_ -| .'| | -_| | _| . | | | | | . | | _| .'| | | . | -_| | | | .'| . | -_| |_ -|\n"
  35. +"|__| |_| |___|___|___|___|___|__,|_|_|_|___|_|_|_| |___| |____/|_|_ |_|_| |__,|_| |___|___| |_|_|_|_|__,|_ |___|_|_|___|\n"
  36. +" |___| |___| \n\n\n\n"
  37. +"\t+---+-------------------------------------------------------+\n"
  38. +"\t| | Digite o numero da opção desejada |\n"
  39. +"\t+---+-------------------------------------------------------+\n"
  40. +"\t| 1 | |\n"
  41. +"\t| 2 | |\n"
  42. +"\t| 3 | |\n"
  43. )
  44.  
  45.  
  46. elif(MenuSelect == '0'):
  47. print("Programa finalizado com sucesso.")
  48. break;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement