Skip to content

PixelDiff is a desktop and command line tool to visualize differences between images, designed for use with screenshot tests.

License

Notifications You must be signed in to change notification settings

screenshotbot/pixel-diff

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PixelDiff Logo

PixelDiff Logo

PixelDiff

A visual image comparison tool for pixel-perfect difference detection. Designed for use with Screenshot tests.

PixelDiff Logo

Overview

PixelDiff is an open source GUI application for comparing two images, or multiple images between Git branches.

Features

  • Difference Highlighting: Visual overlay showing exactly which pixels have changed
  • Interactive Navigation: Pan and zoom to examine differences in detail
  • Multiple View Modes: Toggle between previous image, updated image, and difference overlay
  • Zoom to Changes: Automatically focus on areas with detected differences
  • Pixel-Level Analysis: Hover over pixels to see exact color values and changes
  • Transparency Support: Proper handling of images with alpha channels

Usage

You can pass in two arguments, which are two files and it compares the two:

pixel-diff file-before.png file-after.png

For example, in this repository we have two sample images to try this against:

pixel-diff src/pixel-diff/examples/image1.png src/pixel-diff/examples/image2.png

If you're inside a Git repository, you can also pass in branches:

# Compare all the changes in the current checkout with the main branches
pixel-diff main

# Compare all the changes betweens two branches
pixel-diff tags/release-1.0 tags/release-2.0

View Modes

  • Previous: Shows only the original image
  • Diff: Highlights changed pixels in red overlay (default)
  • Updated: Shows only the new image

Press v to toggle between Previous and Updated, which is useful to visuable differences in a zoomed-in version of the image.

Controls

Mouse Controls

  • Click & Drag: Pan around the image
  • Mouse wheel: Zoom into parts of the image
  • Mouse Hover: Display pixel color information

Keyboard Shortcuts

  • V: Toggle between Previous/Updated views
  • + / -: Zoom in/out at cursor position

Interface Elements

  • View Radio Panel: Switch between Previous, Diff, and Updated modes
  • Zoom to Change Button: Automatically center on first detected difference
  • Status Bar: Shows pixel information and color values

Implementation

PixelDiff is implemented in Common Lisp using the CAPI (Common Application Programmer Interface) for cross-platform GUI functionality.

License

Mozilla Public License v2.0

Author

PixelDiff is built and maintained by (https://screenshotbot.io)[Screenshotbot].

Screenshotbot is the industry standard screenshot testing SaaS solution that works with your existing screenshot tests. Screenshotbot stores screenshots, produces clean reports on Pull Requests, reduces overhead with scaling up your screenshot testing efforts. Much of image processing algorithms used by PixelDiff is available on our web based image comparison tools.

About

PixelDiff is a desktop and command line tool to visualize differences between images, designed for use with screenshot tests.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages