Python Forum
[Tkinter] Problem loading an image from directory into a Canvas object
Thread Rating:
  • 1 Vote(s) - 1 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[Tkinter] Problem loading an image from directory into a Canvas object
Quote:what is driving me mad is that I don't even get an error message
There is no error to report. You have to keep a copy of the image, otherwise it is garbage collected when the function, init in this case, exits, so does not show because it's gone. Make the photo variable an instance object.

Messages In This Thread
RE: Problem loading an image from directory into a Canvas object - by woooee - Sep-02-2018, 06:47 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  how do i find the canvas location of an object? gr3yali3n 8 718 Mar-06-2021, 05:49 PM
Last Post: deanhystad
  how to resize image in canvas tkinter samuelmv30 2 1,942 Feb-06-2021, 03:35 PM
Last Post: joe_momma
  Problem about image and button scotesse 5 936 Apr-27-2020, 10:09 AM
Last Post: scotesse
  [Tkinter] Display Selected Image from Directory and Resize it EchoLi 0 1,839 Oct-02-2019, 06:54 PM
Last Post: EchoLi
  [Tkinter] Resizing image inside Canvas (with Canvas' resize) Gupi 2 18,474 Jun-04-2019, 05:05 AM
Last Post: Gupi
  Canvas refreshing problem Faruk 2 1,084 Dec-04-2018, 08:52 AM
Last Post: Faruk
  'list' object has no attribute 'plot' problem BaartCM 2 10,103 Feb-03-2018, 09:20 PM
Last Post: BaartCM
  Problem with pygame not switching the mouse image Mondaythe1st 6 3,817 Jul-26-2017, 10:53 PM
Last Post: metulburr
  Drag and drop image object vijaysagi 1 11,810 Apr-06-2017, 09:36 AM
Last Post: wuf

Forum Jump:

User Panel Messages

Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020