0

i don t know how to load an image from my desktop here is my code:

imgXBM = BitmapImage(file="./img/pylogo.xbm")

labelXBM = Label(monCadre, text="image XBM : 1 bit/pixel", font=maFonte,

bg="#b0b0ff")

labelImgXBM = Label(monCadre, image = imgXBM,font=maFonte, bg="#b0b0ff")'

in such attempt it show s me : _tkinter.TclError: couldn't read bitmap file

Juan Diego Lozano
  • 989
  • 2
  • 18
  • 30
Hamza Kadimi
  • 1
  • 1
  • 3
  • This may help https://stackoverflow.com/questions/10133856/how-to-add-an-image-in-tkinter – tan_an Jul 07 '20 at 13:25
  • Try giving the full path name of the bitmap file. Also you need to call one of the layout functions (`pack()` or `grid()` or `place()`) on the labels. – acw1668 Jul 08 '20 at 04:12

0 Answers0