title: Tkinter Pillow, i cant see pic
body: <p>What I'm trying to do is;</p>
  
  <p>1- Select a picture and save it in a new directory by giving it a 'model no' and 'stock code'.</p>
  
  <p>2- Then display the picture on the screen with this new name.</p>
  
  <p>The first step is successful. However, when I invited him to the picture screen, I could not get the picture even though it made room for him. What am I doing wrong .. !!</p>
  
  <p>thanks in advance for your help.
  Here are my codes.</p>
  
  <pre><code>from tkinter import filedialog
  import shutil
  import os
  from tkinter import *
  from PIL import ImageTk, Image
  
  model_no = "Y101"
  stock_code = "Y101BLACK"
  pencere = Tk()
  
  Lframe = LabelFrame(pencere, text=" Resim ", bg="#eeeeee")
  Lframe.grid(row=0, column=6, rowspan=2, columnspan=3, sticky='wens', pady=5, padx=5)
  
  def resimal():
      filename = filedialog.askopenfilename(initialdir = "C:\\Python34\\build",title = "Select file",
                                                  filetypes = (("jpeg files","*.jpg"),("all files","*.*")))
      print("filename: ", filename)
      fln = filename.split("/")[-1]
      print("fln", fln)
  
      backup_directory = ["{}\\Documents\\Ortak Yedek\\{}".format(os.path.expanduser('~'), model_no)]
  
      try:
          os.makedirs(os.sep.join(backup_directory))  # Indexing from List to Backup
      except OSError:
          pass
  
      if filename:
          shutil.copy2(filename, os.sep.join(backup_directory)) # Backup / import directories
      else:
          return
  
      try:
          os.rename("{}\\{}".format(os.sep.join(backup_directory), fln),
                    "{}\\{}.jpg".format(os.sep.join(backup_directory), stock_code))
      except FileExistsError:
          print("error")
  
      backup_directory = ["{}\\Documents\\Ortak Yedek\\{}".format(os.path.expanduser('~'), model_no)]
      picture = "{}\\{}.jpg".format(os.sep.join(backup_directory), stock_code)
  
      img = ImageTk.PhotoImage(Image.open(picture))
  
      panel = Label(Lframe, image=img)
  
      panel.grid(row=1, column=0)
  
  take_picture = Button(Lframe, text="Take Picture", width=10, command=resimal)
  take_picture.grid(row=0, column=0, sticky='we')
  
  
  mainloop()
  </code></pre>