Commit 063206a8 authored by Claire Lemoine's avatar Claire Lemoine
Browse files

Merge branch 'master' of https://gitlab.ensimag.fr/lemoincl/tp3-image into master

parents dac3f0da 1cb4ee70
......@@ -21,14 +21,14 @@ def choisir(titre):
impath = tkinter.filedialog.askopenfilename(
filetypes=[ ("jpeg image", "*.jpg"),
("tif image", "*.tif"),
("portable network g", "*.png")],
("portable network graphics", "*.png")],
initialdir=os.path.basename(os.path.abspath(__file__)),
title=titre)
if not impath:
sys.stderr.write("Il faut selectionner un fichier!\n")
return
image = cv2.imread(impath)
if image == None:
if isinstance(image, type(None)):
sys.stderr.write("L'image est corrompue!\n")
return
return image
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment