Re: Image loading problem

2016-05-22 Thread Christian Gollwitzer
Am 22.05.16 um 22:19 schrieb Random832: On Sun, May 22, 2016, at 15:37, Michael Torrie wrote: The reference is indeed held by the label but the problem is the label is a Tcl/Tk object, thinly wrapped in Python. Okay but then in that case why doesn't the image get instantiated as a Tcl/Tk

Re: Image loading problem

2016-05-22 Thread Random832
On Sun, May 22, 2016, at 15:37, Michael Torrie wrote: > The reference is indeed held by the label but the problem is the label > is a Tcl/Tk object, thinly wrapped in Python. Okay but then in that case why doesn't the image get instantiated as a Tcl/Tk object which the label holds a reference

Re: Image loading problem

2016-05-22 Thread Michael Torrie
On 05/21/2016 01:55 PM, Random832 wrote: > On Sat, May 21, 2016, at 12:54, Peter Otten wrote: >> It's not your fault, there's an odd quirk in the library: you have to >> keep a reference of the PhotoImage instance around to prevent the >> image from being garbage-collected. > > Just out of

Re: Image loading problem

2016-05-22 Thread Peter Otten
Random832 wrote: > On Sat, May 21, 2016, at 12:54, Peter Otten wrote: >> It's not your fault, there's an odd quirk in the library: you have to >> keep a reference of the PhotoImage instance around to prevent the >> image from being garbage-collected. > > Just out of curiosity, why is this a

Re: Image loading problem

2016-05-21 Thread huey . y . jiang
Thanks so much! All of methods works! -- https://mail.python.org/mailman/listinfo/python-list

Re: Image loading problem

2016-05-21 Thread Random832
On Sat, May 21, 2016, at 12:54, Peter Otten wrote: > It's not your fault, there's an odd quirk in the library: you have to > keep a reference of the PhotoImage instance around to prevent the > image from being garbage-collected. Just out of curiosity, why is this a "quirk" and not a bug? Why

Re: Image loading problem

2016-05-21 Thread Terry Reedy
On 5/21/2016 12:54 PM, Peter Otten wrote: sweating_...@yahoo.com wrote: I am working on an image project, and I can display my image in main(). I mean, I can load my image in my main(). Needless, it is awkward. I am trying to load my image with a function, but got an empty image window popped

Re: Image loading problem

2016-05-21 Thread Gary Herron
On 05/21/2016 08:22 AM, sweating_...@yahoo.com wrote: Hi All, I am working on an image project, and I can display my image in main(). I mean, I can load my image in my main(). Needless, it is awkward. I am trying to load my image with a function, but got an empty image window popped up, no

Re: Image loading problem

2016-05-21 Thread Peter Pearson
On Sat, 21 May 2016 08:22:41 -0700 (PDT), sweating_...@yahoo.com wrote: > > I am working on an image project, and I can display my image in > main(). I mean, I can load my image in my main(). Needless, it is > awkward. I am trying to load my image with a function, but got an > empty image window

Re: Image loading problem

2016-05-21 Thread Peter Otten
sweating_...@yahoo.com wrote: > I am working on an image project, and I can display my image in main(). I mean, I can load my image in my main(). Needless, it is awkward. I am trying to load my image with a function, but got an empty image window popped up, no image content loaded. Please take

Image loading problem

2016-05-21 Thread sweating_...@yahoo.com
Hi All, I am working on an image project, and I can display my image in main(). I mean, I can load my image in my main(). Needless, it is awkward. I am trying to load my image with a function, but got an empty image window popped up, no image content loaded. Please take a look at code: rom