You can't add images directly in Python because it is a console-based language and you can't add images on the console directly. So rather, you will have to use Python's Tkinter Framework.
Lemme quickly overview how can you get an image to show in Tkinter.
Import Tkinter :
from tkinter import *
Create the window using Tk class:
root = Tk()
Create a cavas and pass in the width, height parameters:
You can't add images directly in Python because it is a console-based language and you can't add images on the console directly. So rather, you will have to use Python's Tkinter Framework.
Lemme quickly overview how can you get an image to show in Tkinter.
Import Tkinter :
Create the window using Tk class:
Create a cavas and pass in the width, height parameters:
Add an image file, only works with pngs:
And run the window using
mainloop()
. Now, you will have your image displayed on a UI interface:Hope this helped :P :D :) :}
@OldWizard209 for amongus.png, where do you get that? do you have to make a new file in replit? pleases explain
yea just upload the amongus file @ashmolekangaroo
it did not work for me. @OldWizard209
yeah how do i upload the file, im a noob btw @OldWizard209