On Sun, 12 Apr 2009 06:09:52 Wayne Watson wrote:
> import PIL
> import PIL.Image as Image
>
> img=Image.open('white dragon.png')
>
> (By the way, is "import Image" depreciated? it should be.)
There's no value in importing a module and renaming it to the same name.
Your second import statement sho
Title: Signature.html
I thought I posted the solution,
from Tkinter import *
import Image, ImageTk
import tkFileDialog
Maybe as part of another thread. I've found it quite easy to put things
in the wrong place. That has to do with sometimes not changing my usual
format from html to plain text,
I thought I posted the solution,
from Tkinter import *
import Image, ImageTk
import tkFileDialog
Maybe as part of another thread. I've found it quite easy to put things
in the wrong place. That has to do with sometimes not changing my usual
format from html to plain text, which hangs
Fredrik Lundh wrote:
The Tkinter module contains a "Image" class, so doing the "import *"
thing after all other imports will stomp out the Import module.
Either fix all uses of PIL to use fully qualified names (replace
"import Image" with "import PIL.Image", "Image.open" with
"PIL.Image.open" etc
The Tkinter module contains a "Image" class, so doing the "import *"
thing after all other imports will stomp out the Import module.
Either fix all uses of PIL to use fully qualified names (replace
"import Image" with "import PIL.Image", "Image.open" with
"PIL.Image.open" etc), or, easier, move the
Still a problem.
import PIL
import Image
from Tkinter import *
...
cnv.pack(expand=1,fill=BOTH)
data.cnv=cnv
img=Image.open('jupa9810.jpg') # some image you have.
data.img=ImageTk.PhotoImage(img)
produces:
Traceback (most recent call last):
File
"C:\Sandia_Meteors\Sentinel_Dev
On Wed, Apr 8, 2009 at 5:55 PM, Edward Cannon wrote:
> Add the line
> from Tkinter import
Lost an asterisk there, I think:
from Tkinter import *
>
>
>
> On Apr 7, 2009, at 10:21 PM, Wayne Watson
> wrote:
>
>> This looks good, but there's a slight problem. It looks right, but I get
>> this
Add the line
from Tkinter import
On Apr 7, 2009, at 10:21 PM, Wayne Watson
wrote:
This looks good, but there's a slight problem. It looks right, but I
get this when I try to run it:
Traceback (most recent call last):
File "C:/Sandia_Meteors/Sentinel_Development/Development_Sentuser-
Ut
This looks good, but there's a slight problem. It looks right, but I get
this when I try to run it:
Traceback (most recent call last):
File
"C:/Sandia_Meteors/Sentinel_Development/Development_Sentuser-Utilities/Playground/fun-move_object.py",
line 42, in
root=Tk()
NameError: name 'Tk' is
Here is a *dumb* example of what I think you want. It can be elaborated with
crosshairs, ring sizing, etc.
import PIL
import Image
import ImageTk
class data:
startx=0
starty=0
def startmotioncallback(event):
data.startx=event.x
data.starty=event.y
def motioncallback(event
I do this using a callback from Tkinter, (and do the calculations in
PIL) but you could get the callbacks from any windowing system you
cared to use.
On Tue, Apr 7, 2009 at 11:25 AM, Wayne Watson
wrote:
> Are you doing this purely with PIL or some toolkit? I would use a callback
> that each time
Are you doing this purely with PIL or some toolkit? I would use a
callback that each time the mouse moves you move the image.
What about rubber lines, stretching, for an to resize an object like a box?
Laura & Edward Cannon wrote:
I have had great success "moving" items across images by keepin
Christopher Barker wrote:
Wayne Watson wrote:
Drawing on top of an image doesn't seem like it's going to help much
if I want the user to move the circle-crosshair with his mouse.
I think we need a little more detail about what you need here:
Is the cross-hair there for the user to indicate th
Wayne Watson wrote:
Drawing on top of an image doesn't seem like it's going to help much if
I want the user to move the circle-crosshair with his mouse.
I think we need a little more detail about what you need here:
Is the cross-hair there for the user to indicate the location of
something wh
BTW, the solution here is:
mask = im.point(lambda i: 255 if i >= 255 else 0)
Wayne Watson wrote:
Consider this program that I pulled off the web and was posted in 1999.
It purports to illustrate how one might produce a transparency.
#!/usr/bin/python
# see
http://mail.python.org/pipermai
Digging around hasn't been very successful; however, with your
suggestion above to look for images and drawing in Wiki-land may pay
off.
Drawing on top of an image doesn't seem like it's going to help much if
I want the user to move the circle-crosshair with his mouse. In some
ways this is ki
(I see I missed shifting my post to text, so it is hung up with the
moderator. This is in text format.)
Digging around hasn't been very successful; however, with your
suggestion above to look for images and drawing in Wiki-land may pay off.
Drawing on top of an image doesn't seem like it
Wayne Watson wrote:
So far I've used Python with Tkinter, and a touch of PIL. I'm pretty
bound by Tkinter, since I'm modifying a program that used it quite a bit
for the GUI ability rather than analysis of images with IP (image
processing).
OK, then dig around in the Tk docs and examples you
Consider this program that I pulled off the web and was posted in 1999.
It purports to illustrate how one might produce a transparency.
#!/usr/bin/python
# see http://mail.python.org/pipermail/python-list/1999-May/003388.html
from Tkinter import *
import Image, ImageTk
import tkFil
So far I've used Python with Tkinter, and a touch of PIL. I'm pretty
bound by Tkinter, since I'm modifying a program that used it quite a bit
for the GUI ability rather than analysis of images with IP (image
processing).
Christopher Barker wrote:
Wayne Watson wrote:
I would like to create
Wayne Watson wrote:
I would like to create a transparent image with a circle
on it and a crosshair at the center of the circle, then place it on top
of the first (real) image (produced by the h/w). I have no trouble
drawing on the real image, but I'd like use this transparency idea here.
Th
21 matches
Mail list logo