|
- import tkinter as tk
-
- from PIL import Image, ImageTk
- from PIL.Image import Resampling
-
- icons = {}
-
- def _load_icon(path, size):
- img = Image.open(path)
- img = img.resize(size, resample=Resampling.HAMMING)
- return ImageTk.PhotoImage(img)
-
- def load_icons():
- icons["refresh"] = _load_icon("ui/icons/refresh.png", (24, 24))
|