Permalink
Browse files

Added Tkinter example

  • Loading branch information...
1 parent da0a59a commit cdff86f02a3f6109e71c58fc48e29fbe898dae64 @xamox xamox committed Oct 2, 2012
Showing with 13 additions and 0 deletions.
  1. +13 −0 SimpleCV/examples/display/tkinter-example.py
View
13 SimpleCV/examples/display/tkinter-example.py
@@ -0,0 +1,13 @@
+import SimpleCV
+import ImageTk #This has to be installed from the system repos
+import Tkinter
+import time
+
+Tkinter.Tk()
+
+image = SimpleCV.Image('http://i.imgur.com/FTKqh.jpg') #load the simplecv logo from the web
+photo = ImageTk.PhotoImage(image.getPIL())
+label = Tkinter.Label(image=photo)
+label.image = photo # keep a reference!
+label.pack() #show the image
+time.sleep(5)

0 comments on commit cdff86f

Please sign in to comment.