#!/usr/bin/env python3
"""
Test script to show thumbnail size differences
"""

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

def create_test_thumbnails():
    """Create test thumbnails to show size differences"""
    root = tk.Tk()
    root.title("Thumbnail Size Test")
    root.geometry("800x600")
    
    # Create a test image (colored rectangle)
    test_image = Image.new('RGB', (100, 100), color='red')
    
    # Create different sized thumbnails
    sizes = [
        (100, 100, "Original (100x100)"),
        (200, 200, "Medium (200x200)"),
        (300, 300, "Large (300x300)"),
        (400, 400, "HUGE (400x400)")
    ]
    
    frame = ttk.Frame(root, padding="20")
    frame.pack(fill=tk.BOTH, expand=True)
    
    for i, (width, height, label) in enumerate(sizes):
        # Resize the test image
        resized = test_image.resize((width, height), Image.Resampling.LANCZOS)
        photo = ImageTk.PhotoImage(resized)
        
        # Create label with image
        img_label = ttk.Label(frame, image=photo)
        img_label.image = photo  # Keep a reference
        img_label.grid(row=0, column=i, padx=10, pady=10)
        
        # Create label with text
        text_label = ttk.Label(frame, text=label, font=("Arial", 12, "bold"))
        text_label.grid(row=1, column=i, padx=10)
    
    # Add instruction
    instruction = ttk.Label(frame, text="This shows the difference in thumbnail sizes. The GUI will use 400x400 and 350x350 pixels!", 
                           font=("Arial", 14, "bold"), foreground="blue")
    instruction.grid(row=2, column=0, columnspan=4, pady=20)
    
    root.mainloop()

if __name__ == "__main__":
    create_test_thumbnails()
