title: Autoscale/relative scale an image in aTkinter frame
body: <p>I'm just learning <code>Python</code> and I'm starting by creating a gui using <code>Tkinter</code>.
  My main window consists of 2 frames; one on the top and one on the bottom.
  On my top frame I'd like to place an image that will have to occupy a relative-to the frame-width and height.</p>
  <p>I'm aware of the <code>label.resize((50, 50), Image.ANTIALIAS)</code> function but the values given to that are absolute.</p>
  <p>Is there a way to use relative dimensions?</p>
  <p>My MWE is the following</p>
  <pre><code>import tkinter as tk
  from tkinter import *
  from tkinter import ttk
  
  from PIL import ImageTk, Image
  
  import os
      
  #____________________________________________________________________________________________      
  #This will be the main window
  window = tk.Tk()
  window.geometry('500x500')
  window.title(&quot;daq&quot;)
  
  #____________________________________________________________________________________________   
  #Upper frame
  frame_logo = Frame(window)
  frame_logo.pack(expand=1, fill=&quot;both&quot;)
  frame_logo.place(rely=0.0, relx=0.0, relwidth=1.0)
  
  # This is the logo that will be placed on the top frame
  image_logo = ImageTk.PhotoImage(Image.open(&quot;images/dice.jpg&quot;).resize((50, 50), Image.ANTIALIAS))
  image_logo_label = tk.Label(frame_logo, image = image_logo)
  image_logo_label.pack(side = &quot;bottom&quot;, fill = &quot;both&quot;, expand = &quot;yes&quot;)
  
  
  #image_logo_label = image_logo_label.resize((50, 50), Image.ANTIALIAS)
  #image_logo_label.place(relx=0.5, rely=0.5)
  #image_logo_load   = Image.open(&quot;images/dice.jpg&quot;)
  #image_logo_load = image_logo_load.resize((50, 50), Image.ANTIALIAS)
  #image_logo        = ImageTk.PhotoImage(image_logo_load)
  #image_label       = ttk.Label(frame_logo, image=image_logo)
  #image_label.place(relx=0.8, y=1, relwidth=0.2)
  #image_label.pack(fill=&quot;none&quot;, expand = 0)
  #image_label.image = image_logo
  #image_label.pack(expand=1, fill=&quot;both&quot;)
  #image_label.place(relx=0.8, rely=0.0, relwidth=1., relheight=1.)
  
  #____________________________________________________________________________________________   
  #Lower frame
  frame_main = Frame(window)
  frame_main.pack(expand=1, fill=&quot;both&quot;)
  frame_main.place(rely=0.10, relx=0.0, relwidth=1.0)
  
  #Create a tabcontrol
  tabControl = ttk.Notebook(frame_main)
  
  tab_Digitizer    = ttk.Frame(tabControl)
  tabControl.add(tab_Digitizer, text='   Digitizer   ')
  
  
  tab_SignalViewer = ttk.Frame(tabControl)
  tabControl.add(tab_SignalViewer, text='   Signal Viewer   ')
  
  tabControl.pack(expand=1, fill=&quot;both&quot;)
  
  #This keeps the window open - has to be at the end
  window.mainloop()
  </code></pre>