import tkinter as tk
import imgbits
from PIL import Image, ImageTk

cac = [1,2,3,4,4,5]
img = []
frame = tk.Tk()
frame.geometry("500x500")
if True:
    if True:
        if True:
            if True:
                cac[3] = 1
                cactusbits = imgbits.cactus()
                width = len(cactusbits[0]) * cac[3]
                height = len(cactusbits) * cac[3]
                colors = {
                    1: (255, 255, 255),
                    0: (0, 0, 0)
                }
                image = Image.new('RGB', (width, height))
                for y, row in enumerate(cactusbits):
                    for x, value in enumerate(row):
                        color = colors[value]
                        for i in range(cac[3]):
                            for j in range(cac[3]):
                                image.putpixel((x * cac[3] + i, y * cac[3] + j), color)
                cac_img = ImageTk.PhotoImage(image)
                cactus = tk.Label(frame, text="", bg="#000000", image=cac_img)
                cactus.place(relx=0.5, rely=0.5)
                cactus_2 = tk.Label(frame, text="", bg="#000000", image=cac_img)
                cactus_2.place(relx=0.3, rely=0.3)


frame.mainloop()