AI-Created Software

The following AI-generated aka vibe-coded software. The software is specific to my needs and my system and may not work for you or your system. Support is limited, but if you report a bug I'll certainly look into it. All code is provided in a zip file for you to review should you choose.

Image Comparison Slider

A lightweight desktop tool for comparing two images (or two entire folders of matching images) side by side, using a draggable divider to reveal one image over the other. Built with Tkinter — no web browser, no upload, everything runs locally.

Features

  • Drag-to-reveal comparison — click and drag the vertical divider (or its handle) anywhere on the canvas to blend between the left and right image.
  • Zoom and pan — mouse wheel zooms centred on the cursor; middle-drag, right-drag or shift+drag pans. Presets for Fit, 1:1/2, 1:1 and 1:2, plus + / buttons and a live zoom readout. Above 1:1 the image is drawn with nearest-neighbour so pixel edges stay crisp.
  • Difference view — show the absolute per-pixel difference between the two images, with an amplification factor (×1–×32) to make subtle changes visible. Identical images render pure black.
  • Sync’d loupe — a magnified inset that follows the cursor, showing both images at the same image-space point split down the middle (or the difference, when difference view is on).
  • Pair strip — a scrollable thumbnail list of every matched pair; click to jump straight to one. Thumbnails load lazily so large folders don’t freeze the UI.
  • Drag and drop — drop a file or folder onto either path field, or onto the left/right half of the canvas. Requires tkinterdnd2; without it the app falls back to the browse buttons.
  • Explicit resolution mismatch handling — differing resolutions are called out in the UI rather than silently scaled.
    Match sizes rescales the right image onto the left’s pixel grid; difference view requires it and turns it on automatically.
  • Two comparison modes:
    • File vs. file — compare two specific images directly; filenames don’t need to match.
    • Folder vs. folder — compare every image present in both folders, matched by name (or by relative path with Recursive enabled), and step through pairs with ◀ Prev / Next ▶ or / .
  • Live dimension info: native resolution of each image plus the current on-screen size.
  • Rescan — change either path and reload without restarting.
  • Settings persistence — window geometry, last-used paths, and the Recursive / Match sizes / amplification options are remembered.
  • Windows-aware: handles display scaling correctly and sets its own taskbar icon rather than falling back to Python’s default.

Requirements

pip install Pillow

Drag-and-drop is optional and needs one extra package. Everything else works without it:

pip install tkinterdnd2

Tkinter ships with most standard Python installers (python.org, Windows, macOS). On some Linux distributions you may need to install it separately, e.g. sudo apt install python3-tk.

Usage

Run with no arguments and set paths from within the app:

python image-compare.py

Or pass starting paths directly:

python image-compare.py --left-file-or-folder-path "C:\images\before" --right-file-or-folder-path "C:\images\after"
Argument Description
--left-file-or-folder-path Path to a file or folder for the left side
--right-file-or-folder-path Path to a file or folder for the right side

Both paths must be the same type — two files, or two folders. Comparing a file against a folder isn’t supported and will show an error.

If you launch without arguments, the app reopens with whatever paths you used last session.

Controls

Action How
Reveal left/right image Click and drag the divider or its handle
Nudge divider precisely [** / **]
Zoom Mouse wheel (centred on cursor), + / buttons or keys
Pan Middle-drag, right-drag, or shift+left-drag
Reset to fit / actual size Fit button or 0 key / 1:1 button or 1 key
Next / previous pair Next ▶ / ◀ Prev, or / keys
Jump to a specific pair Click its thumbnail in the Pairs strip
Toggle difference view Difference checkbox; set strength with the × spinner
Toggle magnifier Loupe checkbox
Set paths Drag a file/folder onto a path field or canvas half, or use Folder… / File…, then Rescan

Arrow-key navigation and the zoom/divider shortcuts are suppressed while you’re typing in a path field.

How folder matching works

When both paths are folders, the app looks for images that exist in both folders under the same name, among these supported extensions:

.jpg  .jpeg  .png  .bmp  .gif  .tiff  .tif  .webp

Only the matched pairs are shown, sorted alphabetically. Files that exist in only one of the two folders are skipped.

With Recursive enabled (checkbox in the toolbar, or --recursive on the command line), the app walks sub-folders too and matches on the relative path rather than the bare filename — so sub/deep/c.png pairs only with sub/deep/c.png on the other side, never with a same-named file in a different directory.

Mismatched resolutions

If a pair’s two images have different resolutions, a warning appears next to the dimensions. With Match sizes on (the default) the right image is rescaled onto the left image’s pixel grid so the two line up; with it off, the images are shown at their own sizes and the warning notes that the comparison isn’t aligned. Difference view needs a shared pixel grid, so enabling it turns Match sizes on automatically.

Settings file

Window size/position, the last-used paths, and the Recursive / Match sizes / difference-amplification options are saved to image_compare_settings.json, created next to the script the first time you close the app. Delete this file to reset to defaults.

Title bar / taskbar icon

The app looks for its icon in the same folder as the script:

your-app-folder/
├── image-compare.py
├── image-compare.ico
└── Resources/
    ├── image-compare_icon_16.png
    ├── image-compare_icon_32.png
    └── image-compare_icon_64.png

If these files are missing, the app still runs normally — it just falls back to Tk’s default icon. If you run the script from a terminal and the icon doesn’t appear, look for a [icon] ... line printed on startup; it will say exactly which file couldn’t be found or loaded.

Troubleshooting

  • “No valid matching image pairs found” — in folder mode, this means no filenames matched between the two folders, or neither folder contains any supported image extensions.
  • “Type Mismatch” error on Rescan — one path points to a file and the other to a folder. Both must be the same type.
  • Drag-and-drop does nothingtkinterdnd2 isn’t installed; the hint line at the bottom of the window says so. Install it, or use the Folder… / File… buttons instead.
  • Difference view is entirely black — that means the two images are identical in the visible region. Raise the × amplification to bring out very small differences.
  • Blurry or oversized window on Windows — this shouldn’t happen; the app declares itself DPI-aware on startup. If you still see it, check you’re running the unmodified script (this fix lives in _make_dpi_aware() near the top of the file).
Download Release:
⬇️ Image Compare.zip
(1 votes, average: 5.00 out of 5)

Leave a Reply

Your email address will not be published. Required fields are marked *

Notify me of followup comments via e-mail.