Make a photo contact sheet
Lay a folder of photos out on a single labelled sheet for selecting your favourite shots.
Starter prompt
Write a Python 3 script using Pillow that reads JPEG and PNG files from an input folder and writes a new four-column contact sheet with filenames underneath. Keep the originals untouched, correct EXIF orientation, and fit both landscape and portrait thumbnails without cropping. Accept the folder and output path as command-line arguments. Show an example using a folder named photos and an output named contact-sheet.jpg.
Step by step
Prepare a small photo folder
Make a new folder for the project and create a photos folder inside it. Add three copied images, including one portrait. In the prompt, choose the number of columns and the labels you want.
Save the script and install Pillow
Copy the Python code into a plain-text file named sheet.py in the project folder. Install Python 3 if needed. On macOS or Linux, open a terminal there and run the commands below. On Windows, create the environment with py -m venv .venv and use .venv\Scripts\python.exe as the interpreter.
python3 -m venv .venv .venv/bin/python -m pip install PillowMake the sheet
Run the command below using the script’s argument order. Open contact-sheet.jpg and check that all filenames and orientations match. Add the rest of your photos and choose a new output filename for the full selection.
.venv/bin/python sheet.py photos contact-sheet.jpg