I've started with this, but it's not hacking it. Aside from not knowing
how to attach img to the canvas, it has a few problems. First it gives: AttributeError: class Image has no attribute 'open' wagon.tif does exist in the same folder as the program. Then draw.line() are a bit shaky after I meddle a bit. I get an objection that fill=None objects to multiple values. I've seen two different formats for the coordinates: (0,0,10,100) and ((0,0),(10,100). # fun and games import Image, ImageDraw from Tkinter import * root = Tk() root.title('Simple Draw on Image') canvas = Canvas(root, width=450, height=300, bg = 'white') canvas.pack() im = Image.open("wagon.tif") draw = ImageDraw.Draw(im) draw.line((0, 0,100,100, file=None) canvas.new(draw) root.mainloop() --
Wayne Watson (Watson Adventures, Prop., Nevada City, CA) (121.01 Deg. W, 39.26 Deg. N) GMT-8 hr std. time) Copper and its alloys have been found effective in hospital sinks, hand rails, beds, ... in significantly reducing bacteria. Estimates are 1/20 people admitted to a hospital become infected, and 1/20 die from the infection. -- NPR Science Friday, 01/16/2009 Web Page: <www.speckledwithstars.net/> |
_______________________________________________ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor