I have been trying to create this piece that changes all of the white pixels in an image to the hex value of the current background but I cannot get past the error:
AttributeError: type object 'Image' has no attribute 'open'
I have installed many of the PIP/pillow/PIL packages and I'm not even sure if this is the problem.
This is my code that reproduces the error:
import tkinter as tk
import sys
from PIL import Image
from datetime import datetime
from tkinter import *
import time
# ...
# List of image filenames
images = ["personal progress.png", "settings.png", "stopwatch.png"]
# Loop through each image
for img_filename in images:
# Load the image using PIL
img = Image.open(img_filename) # AttributeError raised here