PhotoImage problem

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • jimgardener

    PhotoImage problem

    hi
    I am using Python 2.5.1. In my code i want to use
    self.myimage=Ph otoImage (file=self.myfi le)

    so i can create the image in a canvas
    self.mycanv.cre ate_image(70,10 0,image=self.my img)

    it works when i add,
    from ImageTk import PhotoImage

    but this import caused an error message when i tried to run this in a
    friend's linux machine that had python and PIL. Is PhotoImage part of
    standard python library?In new versions of python do i have to modify
    this import statement in anyway?

    thanks
    jim
  • Guilherme Polo

    #2
    Fwd: PhotoImage problem

    ---------- Forwarded message ----------
    From: Guilherme Polo <ggpolo@gmail.c om>
    Date: Mon, Jun 30, 2008 at 1:00 PM
    Subject: Re: PhotoImage problem
    To: jimgardener <jimgardener@gm ail.com>


    On Mon, Jun 30, 2008 at 12:02 PM, jimgardener <jimgardener@gm ail.comwrote:
    hi
    I am using Python 2.5.1. In my code i want to use
    self.myimage=Ph otoImage (file=self.myfi le)
    >
    so i can create the image in a canvas
    self.mycanv.cre ate_image(70,10 0,image=self.my img)
    >
    it works when i add,
    from ImageTk import PhotoImage
    >
    but this import caused an error message when i tried to run this in a
    friend's linux machine that had python and PIL. Is PhotoImage part of
    standard python library?In new versions of python do i have to modify
    this import statement in anyway?
    PhotoImage is a class in the Tkinter module, so if you have from
    Tkinter import * and from ImageTk import PhotoImage it is very
    possible that you will have problems.

    --
    -- Guilherme H. Polo Goncalves

    Comment

    Working...