title: Unable to display background image using Tkinter
body: <p>The problem is when I run this code, the buttons, the labels, are showed up. But only the background image doesn't. I do not know what happen to it. I tried to refer to solution available on the internet, but did not find solution. Anyway, this code can be run without error. Please help me.</p>
  <pre><code>import tkinter as tk
  from tkinter import *
  from PIL import ImageTk, Image
  import numpy as np
  
  
  
  
  class ProcessImage_window:
      def __init__(self, master):  # parent, *args, **kwargs):
          self.master = master
          self.frame = tk.Frame(self.master)
  
          # Define images and icons
          self.bg = ImageTk.PhotoImage(Image.open('C:\\xampp\htdocs\PyFYP\images\\neon.png'))
  
  
          # OpenCV window name
          self.windowName = &quot;Selected Image&quot;
  
          # Background image
          self.Img_process_background = Label(master, image=self.bg)
          self.Img_process_background.place(x=0, y=0, relwidth=1, relheight=1)
  
          # Attributes for setting coordinates
          self.coordinate = np.zeros((3, 2), int)
          self.counter = 0
          self.file_path_name = &quot;&quot;  # Uploaded image's file path
  
          # Labels and Buttons
  
          # Upload Image label and entry
          self.uploadImg_label = Label(master, text=&quot;Please upload your preference image here.&quot;, bg=&quot;#1f1a30&quot;,
                                       font=(&quot;arial&quot;, 12, &quot;bold&quot;), fg=&quot;white&quot;)
          self.uploadImg_label.place(x=50, y=50)
          self.uploadImg_note = Label(master, text=&quot;* Only jpg, jpeg, png, are allowed.&quot;, bg=&quot;#1f1a30&quot;,
                                      font=(&quot;arial&quot;, 8, &quot;bold&quot;), fg=&quot;grey&quot;)
          self.uploadImg_note.place(x=50, y=75)
          self.img_resize_note = Label(master, text=&quot;* Image will be resize to 900x500.&quot;, bg=&quot;#1f1a30&quot;,
                                       font=(&quot;arial&quot;, 8, &quot;bold&quot;), fg=&quot;grey&quot;)
          self.img_resize_note.place(x=50, y=100)
          self.txt_uploadImg = Entry(master, font=(&quot;arial&quot;, 10), bg=&quot;#39304d&quot;, fg=&quot;white&quot;, borderwidth=0)
          self.txt_uploadImg.place(x=50, y=125, width=350, height=20)
  
  
  def main_image_process():
      imageprocess_page = tk.Tk()
      imageprocess_page.title(&quot;Image processing&quot;)
  
      imageprocess_page.iconbitmap('C:\\xampp\htdocs\PyFYP\Icon\snake2.ico')
      imageprocess_page.resizable(False, False)
  
      app_width = 900
      app_height = 500
  
      screen_width = imageprocess_page.winfo_screenwidth()
      screen_height = imageprocess_page.winfo_screenheight()
  
      sys_width = (screen_width / 2) - (app_width / 2)
      sys_height = (screen_height / 2) - (app_height / 2)
      imageprocess_page.geometry(f'{app_width}x{app_height}+{int(sys_width)}+{int(sys_height)}')
      ProcessImage_window(imageprocess_page)
      imageprocess_page.mainloop()
  
  
  if __name__ == &quot;__main__&quot;:
      main_image_process()
  </code></pre>