AI-Created Software

Last Updated: September 23, 2026

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 desktop tool for comparing two images, or two folders of images, pixel for pixel. You can view a pair with a draggable split divider, stack the two images and flip between them with a click, or show their pixel difference. It also has zoom, pan and a magnifying loupe for close inspection.

Built with Python, Tkinter and Pillow.

Features

  • Slider mode. The left image is on one side of a divider and the right image is on the other. Drag the divider to reveal more of either one.
  • Overlay mode. The two images are stacked. A single click (or Space) flips between them, which makes small shifts and colour changes easy to spot.
  • Difference mode. Shows the absolute per-pixel difference between the two images. An optional amplification factor (×1–32) makes faint differences visible.
  • Loupe. A 360 px magnifier at 4× that follows the cursor. It shows the image-space coordinates of the pixel under the cursor.
  • Zoom and pan. Zoom with the mouse wheel around the cursor, or use the Fit / 50% / 100% / 200% presets. Both images always move together.
  • Folder comparison. Pairs up images with the same name (or the same relative path, in recursive mode) across two folders.
  • Size-mismatch handling. Pairs whose resolutions differ are flagged. You can optionally scale them onto the same grid.
  • Drag and drop. Drop files or folders onto the path fields or the image area (requires tkinterdnd2).
  • Remembers your setup. Paths, options, window size and position are saved between sessions.

Requirements

  • Python 3 with Tkinter. Tkinter is included with the standard Windows and macOS installers. On Debian/Ubuntu, install it with sudo apt install python3-tk.
  • Pillow
  • Optional: tkinterdnd2 for drag-and-drop. Without it, the app works normally with the Folder… / File… buttons, and the status bar notes that drag-and-drop is unavailable.
pip install Pillow
pip install tkinterdnd2   # optional

Running

python image-compare.py

With no arguments, the app reopens the last paths you used. You can also pass paths on the command line:

# Compare two folders
python image-compare.py --left-file-or-folder-path ./before --right-file-or-folder-path ./after

# Compare two specific files (their names don't need to match)
python image-compare.py --left-file-or-folder-path a.png --right-file-or-folder-path b.png

# Match images in sub-folders too
python image-compare.py --left-file-or-folder-path ./before --right-file-or-folder-path ./after --recursive

Command-line options

Option Description
--left-file-or-folder-path PATH File or folder for the left side.
--right-file-or-folder-path PATH File or folder for the right side.
--recursive Include images in sub-folders, matched by relative path.
--settings-file-path PATH Settings file to load from and save to. If PATH is a folder, image_compare_settings.json is used inside it.

Paths given on the command line take priority over the saved ones.

How pairs are matched

  • Two files: they are compared directly, whatever their names.
  • Two folders: only images whose file names match on both sides are paired. With Recursive on, the whole folder tree is searched and images are paired by relative path (sub/dir/photo.png on the left pairs with sub/dir/photo.png on the right). Pairs are sorted by path, case-insensitively.
  • A folder and a file: not supported. The app asks for either two folders or two files.

Supported formats are .jpg, .jpeg, .png, .bmp, .gif, .tiff, .tif and .webp. Images are converted to RGB for display.

The window

From top to bottom, the window contains:

  1. Path rows. LEFT and RIGHT path fields, each with Folder… / File… browse buttons and a count of how many images that side contains.
  2. Toolbar.
    • ◀ Prev / Next ▶: move between pairs.
    • VIEW: Fit / 50% / 100% / 200% presets, − / + zoom buttons and the current zoom level.
    • Difference: ON/OFF, plus the amplification factor (×1–32).
    • Loupe: ON/OFF.
    • Rescan: re-read both paths and rebuild the pair list. Use this after typing a new path.
    • Recursive: ON/OFF. Changing it rescans immediately.
    • Match sizes: ON/OFF (see Mismatched sizes).
  3. Info strip. The left file, the pair name with its position (e.g. 3 / 20), and the right file, each with its native resolution. A red ⚠ note appears here when the two sizes differ.
  4. PAIRS panel. Lists every pair, one row each. The selected row expands to show thumbnails of both images. A ⚠ marks pairs whose sizes differ; these are detected in the background. The footer shows how many pairs are mismatched.
  5. COMPARE area. The Slider | Overlay switch, a live readout (divider position or which side is showing, the zoom level, and the image-space point at the centre of the view), and the image itself.
  6. Status bar. Shortcut hints for the current mode, the pair count and drag-and-drop availability.

Controls

Mouse

Action Slider mode Overlay mode
Left-click / drag on image Move the divider Flip between left and right
Mouse wheel Zoom around the cursor Zoom around the cursor
Middle-drag, right-drag or Shift + left-drag Pan Pan
Click a row in PAIRS Open that pair Open that pair

Keyboard

Key Action
← / → Previous / next pair (wraps around)
+ or = Zoom in
− Zoom out
0 Fit to window
1 100% (one screen pixel per image pixel)
[ / ] Nudge the divider left / right by 1% (Slider mode)
Space Flip between left and right (Overlay mode)

Shortcuts are ignored while you’re typing in a path field.

Drag and drop

When tkinterdnd2 is installed:

  • Drop a file or folder onto the LEFT or RIGHT path field to set that side.
  • Drop onto the image area to set the left side (left half) or the right side (right half).

The pair list rescans automatically once both sides have a path.

Comparison modes

Slider (the default) splits the view at the divider, with the left image on the left and the right image on the right. Each side’s folder or file name is shown in a caption in its top corner.

Overlay shows one full image at a time, in the same position and at the same zoom. Click anywhere on the image, or press Space, to flip to the other one. Only the caption for the image currently showing is displayed, in that side’s usual corner, and the COMPARE readout says showing LEFT or showing RIGHT. Switching back and forth quickly is often the fastest way to catch small shifts, crops or colour changes.

Difference takes precedence over both. When it is on, the view shows |left − right| for each pixel: black where the images are identical, brighter where they differ. Raise the × factor to multiply the difference and make subtle changes visible.
Difference needs both images on the same pixel grid, so it turns Match sizes on automatically if the resolutions differ.

The slider/overlay choice is remembered between sessions. Difference and Loupe always start off.

Loupe

With Loupe on, a 360 × 360 px magnified inset follows the cursor. It appears just beside the outlined area it is sampling, so it never covers the spot you’re looking at. It moves to the other side of the cursor, or above/below it, near the edges of the view.

What the loupe shows depends on the mode:

  • Slider: split down the middle, with the left image on the left and the right image on the right, both at the same point.
  • Overlay: whichever image is currently showing. It flips along with the view.
  • Difference: the difference image.

A caption strip along the bottom of the loupe shows the magnification and the pixel coordinates of the cursor in the source image.

To change the loupe, edit these constants near the top of the script:

LOUPE_SIZE = 360   # on-screen size in px
LOUPE_ZOOM = 4.0   # magnification relative to the current view
LOUPE_GAP  = 16    # gap between the sampled area and the loupe

Mismatched sizes

When the two images in a pair have different resolutions, the app flags it in the info strip and marks the row with ⚠ in the PAIRS panel.
A mismatch usually means you’re comparing the wrong things, so the app points it out instead of silently hiding it.

  • Match sizes ON (default): the right image is resized (Lanczos) to the left image’s resolution so the two line up.
  • Match sizes OFF: each image is shown at its native size, anchored to the top-left, so the comparison is not aligned. The Difference control is dimmed in this state because a pixel difference can’t be computed.

Zoom and rendering

At 200% and above, images are scaled with nearest-neighbour sampling so individual pixels stay crisp. Below that, Lanczos resampling is used to avoid aliasing. Only the visible region is resized, so zooming into very large images stays responsive.

The view resets to Fit whenever you open a new pair.
Zoom ranges from 2% to 6400%.

On Windows, the app declares itself DPI-aware, so 100% really means one screen pixel per image pixel, even when display scaling is set to 125% or 150%.

Settings

Settings are saved when you close the window to image_compare_settings.json in the same folder as the script. For a frozen build, the file goes next to the executable. Use --settings-file-path to put it somewhere else.

The saved settings are:

  • the left and right paths
  • Recursive and Match sizes
  • the Difference amplification factor
  • the comparison mode (Slider or Overlay)
  • window size, position and maximized state

Settings files from older versions that used the path_left / path_right or folder_left / folder_right keys are still read.

Window icon (optional)

If these files are present next to the script, they are used for the title bar and taskbar icon:

image-compare.ico
Resources/image-compare-icon-16.png
Resources/image-compare-icon-32.png
Resources/image-compare-icon-64.png

If they are missing, the app still runs with the default Tk icon and prints a one-line note to the console.

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.