Menu
Menu
DaniWeb
Log In
Sign Up
Read
Contribute
Meet
Search
Search
About 306 results for
imagetk
- Page 1
Image and ImageTk weirdness
Programming
Software Development
17 Years Ago
by jrcagle
…chokes! im.resize(250,150) self.image = Label(self, image=
ImageTk
.PhotoImage(im)) self.image.grid() self.grid() mainw = Tk() mainw…if im.mode == "1": # bitmap image self.image =
ImageTk
.BitmapImage(im, foreground="white") Label.__init__(self, master…
Re: Image and ImageTk weirdness
Programming
Software Development
17 Years Ago
by jrcagle
… [php] from Tkinter import * import Image,
ImageTk
filename = "C:/Pictures/2006/2006.07.04…;caption") self.caption.grid() self.image =
ImageTk
.PhotoImage(im) # <--- results of PhotoImage() …) # <--- will not work if 'image =
ImageTk
.PhotoImage(im)' self.image_label.grid() self.grid() im …
Re: Image and ImageTk weirdness
Programming
Software Development
17 Years Ago
by jrcagle
… the import order mattered: [php] from Tkinter import * import Image,
ImageTk
# <--- has to be second to overwrite Tkinter.Image filename… original code: must be tuple self.image = Label(self, image=
ImageTk
.PhotoImage(im)) self.image.grid() self.grid() im = Image.open…
Re: Image and ImageTk weirdness
Programming
Software Development
17 Years Ago
by vegaseat
Thanks Jeff! I had made myself a note when using PIL and Tkinter not to use 'from Tkinter import *' but the simple 'import Tkinter as tk' to avoid namespace conflicts with Image. Your other observations are rather astute!
Re: Image and ImageTk weirdness
Programming
Software Development
17 Years Ago
by aot
Okay, I have a question: Is there any way to resize an image using only Tkinter? This question stems from a deeper root problem -- I can't actually seem to get PIL to install. I keep getting the following error: unable to execute gcc: No such file or directory error: command 'gcc' failed with exit status 1 I can't find 'gcc' in the setup.py …
Grid & RadioButtons
Programming
Software Development
11 Years Ago
by slasel
…info.set("try again") #################################### BUTTONS ################################# pol3=
ImageTk
.PhotoImage(file="pol3.gif") Pol3=Button(root,…Primase.image=primase Primase.grid(row=3) helicase=
ImageTk
.PhotoImage(file="helicase.gif") Helicase=Button(…
Quickly urgent please_creating buttons with loops
Programming
Software Development
11 Years Ago
by slasel
…'t put .23728656.23728856 inside .23729376 . import
ImageTk
import tkMessageBox from Tkinter import* from turtle import *…("try again") #################################### BUTTONS ################################# pol3=
ImageTk
.PhotoImage(file="pol3.gif") Pol3=Button(…
Python Tk GUI Gmail Client.
Programming
Software Development
12 Years Ago
by Sinnocence
…* import Image import PngImagePlugin import
ImageTk
from PIL import Image,
ImageTk
from PIL import PngImagePlugin import os…Image.open('messagewaiting.png') photo12 =
ImageTk
.PhotoImage(image12) image13 = Image.open('toaddr.png') photo13 =
ImageTk
.PhotoImage(image13) ###INSERT### userimput1 =…
Tkinter Image Problem
Programming
Software Development
17 Years Ago
by Logi.
…. Any ideas? [code=python]import Tkinter import random import Image,
ImageTk
def changeImage(): listOfImages = ["r7", "A", "…(image=im) top = Tkinter.Tk() r7 =
ImageTk
.PhotoImage(file="gfx/r7.jpg") b7 =
ImageTk
.PhotoImage(file="gfx/b7.jpg…
Re: Tkinter Image Problem
Programming
Software Development
17 Years Ago
by vegaseat
… do this ... [code=python]import Tkinter import random import Image,
ImageTk
def changeImage(): global listOfImages im = listOfImages[random.randint(0,8…(image=im) top = Tkinter.Tk() r7 =
ImageTk
.PhotoImage(file="gfx/r7.jpg") b7 =
ImageTk
.PhotoImage(file="gfx/b7.jpg…
Tkinter Buttons
Programming
Software Development
11 Years Ago
by slasel
…green",command=tophelicase.destroy).pack() pol3=
ImageTk
.PhotoImage(file="pol3.gif") Pol3…image=pol3 Pol3.grid(row=0) gyrase=
ImageTk
.PhotoImage(file="gyrase.gif") Gyrase…image=primase Primase.grid(row=4) helicase=
ImageTk
.PhotoImage(file="helicase.gif") Helicase=…
import error _imaging
Programming
Software Development
15 Years Ago
by barbosmaw
… line 10, in <module> tkim =
ImageTk
.PhotoImage(im) # Convert the image object to a …[code=python] import Tkinter as Tk import Image import
ImageTk
r = Tk.Tk() c = Tk.Canvas(r, …Open a jpeg file into an image object tkim =
ImageTk
.PhotoImage(im) # Convert the image object to a…
smooth python tkinter image gallery flow
Programming
Software Development
11 Years Ago
by Alexispap
….resize((CWIDTH,distance/2), Image.ANTIALIAS) bgimage =
ImageTk
.PhotoImage(bgim) bglineimage=
ImageTk
.PhotoImage(bglineim) canvas.create_image(CWIDTH/2,CHEIGHT/2 ,….png") #clipim = clipim.resize(PICWIDTH,PICHEIGHT) clipimage =
ImageTk
.PhotoImage(clipim) clipitem = canvas.create_image(CWIDTH/2,CHEIGHT/2 , …
Re: Tkinter Buttons
Programming
Software Development
11 Years Ago
by slasel
… but it only displayed one... what am i missing? import
ImageTk
from Tkinter import* from functools import partial root=Tk() position…(len(txtlst))) n=0 for txt, img in mxlst: imag=
ImageTk
.PhotoImage(file=img) btnz[n]=Button(root,text=txt,image…
import separate scripts in python
Programming
Software Development
11 Years Ago
by vy_007
… functions.. ` from Tkinter import * from PIL import Image,
ImageTk
, ImageEnhance import sys import os import ttk import img_func import… #Enhancement Widgets en2.image = Image.open(filename) en2.tkim =
ImageTk
.PhotoImage(en2.image.mode,en2.image.size) en2.Enhance(root…
To zoom an image in tkinter
Programming
Software Development
11 Years Ago
by vy_007
… from Tkinter import * from PIL import Image,
ImageTk
, ImageEnhance import sys # enhancer widget class Enhance…master) # set up the image self.tkim =
ImageTk
.PhotoImage(image.mode, image.size) self.enhancer = …
Re: import error _imaging
Programming
Software Development
15 Years Ago
by vegaseat
… PIL116 ... [code=python]import Tkinter as Tk import Image import
ImageTk
root = Tk.Tk() c = Tk.Canvas(root, width=500, height…') # Convert the image object to a Tkinter PhotoImage object tkim =
ImageTk
.PhotoImage(im) # Draw the Tkinter image object on the canvas…
Re: Help updating images and texts
Programming
Software Development
14 Years Ago
by vegaseat
… them. import Tkinter as tk from PIL import
ImageTk
, Image class Car(object): """… of the Beetle. """ image =
ImageTk
.PhotoImage(file='Golf_Mk1.jpg') # create the class instance …"""\ test """ image =
ImageTk
.PhotoImage(file='Golf_Mk3.jpg') # create the class instance and …
Re: Tkinter, PIL, PNG transparency issue
Programming
Software Development
14 Years Ago
by neostead
…#convert images to Tk objects iconNormal =
ImageTk
.PhotoImage(iconImage) iconBig =
ImageTk
.PhotoImage(iconImageBig) if self.defIcoWidth == 0:…self.width, self.height), resample=3) background =
ImageTk
.PhotoImage(bckImage) bckPanel = tk.Label(self, image…
Help Tkinter Splash Screen
Programming
Software Development
16 Years Ago
by wandie
… import * try: from PIL import Image,
ImageTk
except ImportError: import Image,
ImageTk
class SplashScreen(Toplevel): def __init__(self, master,…overrideredirect(1) im = Image.open(image) self.image =
ImageTk
.PhotoImage(im) self.after_idle(self.centerOnScreen) self.update() self.after…
Re: Help Tkinter Splash Screen
Programming
Software Development
16 Years Ago
by bumsfeld
… * try: from PIL import Image,
ImageTk
except ImportError: import Image,
ImageTk
class SplashScreen(Toplevel): def __init__(self, master…overrideredirect(1) im = Image.open(image) self.image =
ImageTk
.PhotoImage(im) self.after_idle(self.centerOnScreen) self.update() self…
Help updating images and texts
Programming
Software Development
14 Years Ago
by freddiecool
… encyclopedia which shows #pictures and information about them. import Tkinter,
ImageTk
, Image root = Tkinter.Tk() root.title("Encyclopedia") #…Dictionary with pictures for encyclopedia myImage = { "mk1":
ImageTk
.PhotoImage(Image.open('img/Golf_Mk1.jpg')), "mk2"…
Re: 'Unrecognised image file in python' (posted 7 days ago)
Programming
Software Development
14 Years Ago
by vegaseat
… files import Tkinter as tk from PIL import
ImageTk
def next_image(): import secondscript root = tk.Tk…path image_file = "people1.bmp" photo =
ImageTk
.PhotoImage(file=image_file) root.title(image_file) # put the…path image_file = "people2.bmp" photo =
ImageTk
.PhotoImage(file=image_file) win.title(image_file) # put the…
Tkinter, PIL, PNG transparency issue
Programming
Software Development
14 Years Ago
by neostead
… to run this program." try: from PIL import Image,
ImageTk
except ImportError: raise ImportError,"Please install image module from….resize((self.width, self.height), resample=3) background =
ImageTk
.PhotoImage(bckImage) obrazek =
ImageTk
.PhotoImage(Image.open("ff.png")) bckPanel = tk…
Re: Tkinter, PIL, PNG transparency issue
Programming
Software Development
14 Years Ago
by neostead
…1].strip().split(":")[0].strip() iconImage =
ImageTk
.PhotoImage(Image.open(iconFile)) if self.defIcoWidth == 0:….resize((self.width, self.height), resample=3) background =
ImageTk
.PhotoImage(bckImage) bckPanel = tk.Label(self, image=background) bckPanel…
Closing an image opened by PhotoImage
Programming
Software Development
14 Years Ago
by bharatk
…file_open(self): filename =askopenfilename(filetypes=imageTypes) image1 =
ImageTk
.PhotoImage(Image.open(filename)) panel1 = Label(self, image…file.read()) img = Image.open(im) image1 =
ImageTk
.PhotoImage(img) panel1 = Label(self, image=image1)…
Re: Passing variables from 1 function to another while using tkinter
Programming
Software Development
14 Years Ago
by vegaseat
…python # display an image using Tkinter and PIL #
ImageTk
.PhotoImage() does not have a zoom so use PIL …need its own install on Ubuntu from PIL import Image,
ImageTk
root = tk.Tk() # pick an image file ….ANTIALIAS) # convert to something Tkinter can handle image_tk =
ImageTk
.PhotoImage(image=image_resized) # put the image on a typical widget…
Placing Transparent image over image
Programming
Software Development
13 Years Ago
by gleam.uahmed
…"pic2a.png" pic2a_open =Image.open(pic2a_dest) pic2a_handle =
ImageTk
.PhotoImage(pic2a_open) button1 = Button (root , image = pic2a_handle) button1…"pic1a.png" pic1a_open =Image.open(pic1a_dest) pic1a_handle =
ImageTk
.PhotoImage(pic1a_open) label1 = Label (root , image = pic1a_handle) …
image not displayed on the frame
Programming
Software Development
11 Years Ago
by vy_007
…it. # # # import ImageDraw from Tkinter import * from PIL import
ImageTk
, Image root=Tk() def show(root,filename): imagepath = filename # The…png') h_im = im.resize((400,400),Image.ANTIALIAS) photo =
ImageTk
.PhotoImage(h_im.mode,h_im.size) label=Label(root, image=photo…
time.sleep()
Programming
Software Development
11 Years Ago
by slasel
… canvas.delay(2000) but nothing works! Any help please?! import
ImageTk
import tkMessageBox from Tkinter import* from turtle import * import time…=6, row=0, columnspan=5) start=
ImageTk
.PhotoImage(file="start.gif") after_prymase2a=
ImageTk
.PhotoImage(file="after_prymase2a.gif") canvas…
1
2
3
6
Next
Last
Search
Search
Forum Categories
Hardware/Software
Programming
Digital Media
Community Center
Latest Content
Newest Topics
Latest Topics
Latest Posts
Latest Comments
Top Tags
Topics Feed
Social
Forums
Top Members
Meet People
Community Functions
DaniWeb Premium
Newsletter Archive
Markdown Syntax
Community Rules
Developer APIs
Connect API
Forum API Docs
Tools
SEO Backlink Checker
Legal
Terms of Service
Privacy Policy
FAQ
About Us
Advertise
Contact Us
© 2024 DaniWeb® LLC