from tkinter import *
data = '''#define image_width 15
#define image_height 15
static unsigned char image_bits[] = {
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x38, 0x1c, 0x30, 0x0c, 0x60, 0x06,
0x60, 0x06, 0xc0, 0x03, 0xc0, 0x03, 0x60, 0x06, 0x60, 0x06, 0x30, 0x0c,
0x38, 0x1c, 0x00, 0x00, 0x00, 0x00 };'''
root=Tk()
root.title("Изображения")
root.minsize(width=100, height=100)
image = BitmapImage(data=data, background='red', foreground='green')
button=Button(root, image=image)
button.pack()
root.mainloop()
from tkinter import *
root = Tk()
root.title("Изображения")
def img():
img = PhotoImage(file="Image.gif")
label = Label(root, image=img)
label.image_ref = img
label.pack()
img()
root.mainloop()