def quart_de_tour_naif(nom_fichier : str) -> None: ''' Construit une nouvelle image correspondant au résultat de l'application d’un quart de tour dans le sens horaire ''' img = Image.open(nom_fichier) n, hauteur = img.width, img.height assert n == hauteur nv_img = Image.new('RGB', (n,n)) for x in range(n) : for y in range(n) : nv_img.putpixel( (x,y), img.getpixel( (y, n-1-x) ) ) nv_img.show()