from PIL import Image
import os

source_path = r"c:\Users\kaneo\Projects\truth-lens\extension\public\icons\icon128.png"
dest_path = r"c:\Users\kaneo\Projects\truth-lens\extension\public\icons\icon32.png"

try:
    img = Image.open(source_path)
    img = img.resize((32, 32), Image.Resampling.LANCZOS)
    img.save(dest_path)
    print(f"Successfully created {dest_path}")
except Exception as e:
    print(f"Error: {e}")
