2020欧洲杯手机版注册

A message from our CEO about the future of Stack Overflow and Stack Exchange. Read now.

Questions tagged [photoimage]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
1
vote
0answers
10 views

Adding a resized image to a frame

so I'm resizing an image and adding it to a frame called playingSpace.Here's that piece of code :# Opening up the image fileimg = Image.open("images/gameBoard_pic.jpg")# Resizing the image ...
0
votes
0answers
38 views

tkinter: can't align text to the left on image label

I'm trying to align the text to the top left (using tkinter only). Nothing I tried works so far (anchor, pack, grid with sticky 'w') and I can't understand why. I'm working with several classes, and ...
-1
votes
1answer
40 views

Adding a different image for each button using tkinter

We are creating a Boggle game for school, and we want to make the interface as as nice as possible.We created an icon for each letter and we want each button to have it's icon.For some reason is ...
-1
votes
0answers
16 views

tkinter: placing moving objects on top of picture [duplicate]

I want to make snow falling on top of a given image of background, using tkinter only (no PIL allowed).I have no idea why doesn't it work, it doesn't load the picture at all. (The snow does work ...
0
votes
0answers
17 views

Why do I need to have 'output of ImageTk.PhotoImage()' as a global variable in the function definition, to display an image using Tkinter()-GUI? [duplicate]

Problem: If I don't include 'photo_img_root' in the global; the image is not seen on the window. Why?Context: This code is a small and simplified part of a GUI program implemented using Tkinter. In ...
1
vote
0answers
33 views

Resize PhotoImage using .zoom or .subsample

I want to resize PhotoImage at load stage. As you know, .zoom and .subsample cannot work with floating variables, only integers. Now I resize it with wrong way:i1=PhotoImage(file="res\\1h.gif").zoom(...
0
votes
0answers
18 views

python3 conversion troubles

I'm converting a very large program to python3, and I'm struggling in the following:In py2 I used to create and save a dictionary allicons of GIF icons like this:i = open(iconfilename, 'rb')i....
1
vote
1answer
76 views

PhotoImage zoom

I'm trying to zoom in on an image and display it with the following codeimport tkinter as tkfrom PIL import Image as PIL_image, ImageTk as PIL_imagetkwindow = tk.Tk()img1 = PIL_imagetk....
0
votes
0answers
20 views

Whatever I do with this code it always says that “_tkinter.TclError: couldn't recognize data in image file ”TimeTable.png" [duplicate]

I want to import a image into the program because im creating a app to help people keep track of their school schedule for one of my final projects.I have tried: using a canvasusing the path...
0
votes
1answer
45 views

How do I place sentence on the top?

I'm trying to place sentence (welcome currency converter) on the top, but can't success. import tkinter as tkmy_window = tk.Tk()photo = tk.PhotoImage(file='currency conventer.png')...
0
votes
0answers
13 views

Fail to use a command associated to a button on Tkinter (but no error message) [duplicate]

I'm beginner on Python, actually trying to code something with Tkinter.My problem is that when I run this code, the command of the button don't do its exact job. The picture tower.png should be ...
0
votes
1answer
31 views

tk.PhotoImage couldn`t open “gif”

I have strange behavior of the below code.When I run this code from PyCharm level it works properly and return this window (including gif with Python logo!):Window with Python logoWhen I run the ...
0
votes
0answers
12 views

Tkinter displays a blank image [duplicate]

When I load an image from the general scope it works fine, but when I try to load the image from within a function it displays a blank label.As I understand it happens because the garbage collector ...
0
votes
1answer
43 views

Error while converting PIL image to Tkinter image

I'm trying to rotate an image using Pillow:img = Image.open("./assets/aircraftCarrier/aircraftCarrier0.gif")img = img.rotate(270)This rotates the image but when I try to save it Pillow doesn't ...
-1
votes
2answers
26 views

PhotoImage GIF won't appear (noob friendly please)

Alright, so I want to make a gif display when a function has been called, but the gif will go invisible and not show up. I searched for possible answers but all of them mention "create a reference to (...

15 30 50 per page