+ 2

Draw box in tkinter and insert Image without pil module

I'm working on a project where I have to insert an Image in a box in tkinter and the only ways i know of, is with the pil module, I want to use this code to open the image, but I don't know how I'm going to draw the box and put an image in it see the code for opening up the image, in this paste.org link https://bit.ly/31A41kF The 'box' there is from the box function I'm yet to write, please help me out 🙏🙏🙏

10th Aug 2020, 2:22 PM
Praise James
Praise James - avatar
4 Respostas
+ 1
The only way i could figure was with the pillow module as well. Its not exactly what i wanted but it works. Im sure with some tweaking you could get use out of this. CHECK LINES: 242-250 https://code.sololearn.com/cu8hA6hzGt1l/?ref=app
10th Aug 2020, 2:46 PM
Slick
Slick - avatar
+ 1
Slick, well, this is basically what I did except you are getting data from the web, my main problem is displaying the image, first of all, I want a blank box to appear initially, then a pic in a box as it is opened, secondly, I'll have to use something like canvas to lead to tk.create_rectangle(50, 100,
10th Aug 2020, 2:56 PM
Praise James
Praise James - avatar
+ 1
50, 100)#this code isn't correct, but something similar then I don't know what next
10th Aug 2020, 2:56 PM
Praise James
Praise James - avatar
+ 1
Im sure there's a great way to do it with a canvas but I dont know that way. I ended up sticking the photo in a label. I havent used much canvas and none is directly used in the gui
10th Aug 2020, 3:00 PM
Slick
Slick - avatar