este es el avance que pude hacer
Código
from tkinter import * from PIL import ImageTk, Image from tkinter import filedialog import tkinter as tk ancho = 200 alto = 0 ventana=Tk() ventana.geometry("700x600+100+100") ventana.title("Ejercicio 2") def abre(): pic=filedialog.askopenfilename() img=Image.open(pic) o_size=img.size f_size=(200,200) factor = min(float(f_size[1])/o_size[1], float(f_size[0])/o_size[0]) width = int(o_size[0] * factor) height = int(o_size[1] * factor) rImg= img.resize((width, height), Image.ANTIALIAS) rImg = ImageTk.PhotoImage(rImg) lblImage=Label(ventana,image=rImg).place(x=150,y=150) ventana.mainloop() return rImg def identidad(img): img=abre() salida = Image.new("L",(ancho,alto)) for i in range(img.size[0]): for j in range(img.size[1]): p = img.getpixel((i,j)) q = p salida.putpixel((i,j),q) return salida imgGray = Image.open(filedialog.askopenfilename()).convert("L") ancho,alto = imgGray.size resultado = identidad(imgGray) resultado.show() ##label lbldes=Label(text="Crear en python un menu para seleccionar el tipo de operador puntual a mostrar.",font=("Agency FB",16)).place(x=10,y=45) lblimang=Label(text="Pulse para cargar imagen",font=("Agency FB",14)).place(x=25,y=80) #botones## btnImag=Button(ventana,text="cargar Imagen",command=abre,font=("Agency FB",14),width=15).place(x=200,y=80) btnImag=Button(ventana,text="Operador Identidad",command=identidad,font=("Agency FB",14),width=15).place(x=30,y=370)