Recommended Free Tools
Use OpenCV’s cv2.absdiff() to create a pixel-by-pixel difference image, then threshold that image to highlight candidate changes. For a useful comparison, first make sure both screenshots have the same dimensions and were captured at the same viewport, scale, scroll position, and page state. A pixel diff shows where images vary; it does not decide whether a change is a bug.
Prepare screenshots that can be compared
OpenCV compares corresponding array elements. If one screenshot is shifted, rendered at a different size, or captured while content is still loading, the output can show many differences unrelated to the change you want to investigate.
- Use the same browser viewport and device scale for both captures.
- Keep the scroll position and page UI state consistent. For full-page captures, make sure both images cover the same content.
- Wait for the page to finish loading and, where possible, keep fonts, animations, and dynamic content stable.
- Decide whether different image dimensions are themselves a meaningful change. If not, crop or resize deliberately before comparison; resizing can also alter the pixels being compared.
Generate a pixel-difference image and change mask
The example below reads two screenshots, checks that they loaded and have matching dimensions, and writes three outputs: the raw difference image, a binary mask of candidate changes, and a copy of the second screenshot with changed pixels highlighted. It is an illustrative starting point; choose and tune the threshold for your screenshots rather than treating 25 as a universal cutoff.
import cv2
before = cv2.imread("before.png")
after = cv2.imread("after.png")
if before is None or after is None:
raise ValueError("Could not read both screenshots")
if before.shape != after.shape:
raise ValueError("Screenshots must be aligned and the same size")
diff = cv2.absdiff(before, after)
gray = cv2.cvtColor(diff, cv2.COLOR_BGR2GRAY)
_, mask = cv2.threshold(gray, 25, 255, cv2.THRESH_BINARY)
highlight = after.copy()
highlight[mask > 0] = (0, 0, 255) # Red in OpenCV's BGR color order
if not cv2.imwrite("diff.png", diff):
raise OSError("Could not write diff.png")
if not cv2.imwrite("mask.png", mask):
raise OSError("Could not write mask.png")
if not cv2.imwrite("highlight.png", highlight):
raise OSError("Could not write highlight.png")
Install the OpenCV Python package in your Python environment if it is not already available. The code expects before.png and after.png in the current working directory. cv2.imread() returns no image when it cannot read a file, so the explicit check catches a missing path or unreadable image. The shape check prevents comparing arrays with different dimensions.
Crashes, No Sound, or Screen Glitches?
Random freezes, missing sound and display glitches usually trace back to one bad driver. Find and replace yours safely.Free scan · under a minuteWindows Errors? Fix Them Before They Spread
Repair common Windows errors and clear accumulated junk for a smoother, more stable PC - no reinstall needed.Free scan · no reinstall#1 Best Overall
- Read Before You Buy — No Video Output: These adapters support charging and USB 2.0 data transfer, but cannot transmit video signals. Except for standard USB webcams (which use USB data only), they are not compatible with HDMI/DisplayPort cables, video-capable USB-C hubs, or docking stations with video output.
- Convert USB-A Ports to USB-C: Designed to connect USB-C earphones, cables, flash drives, card readers, and other USB-C accessories to standard USB-A ports. Plug-and-play with no drivers or software required.
- Aluminum Alloy Housing: Built with a sturdy aluminum alloy shell that aids in heat dissipation and protects against daily wear and scratches. Designed to maintain a stable and secure connection.
- Compact & Travel-Friendly: The ultra-compact design allows the adapter to stay plugged into your device without blocking adjacent ports or adding bulk, reducing wear and tear on your original USB ports.
- 12-Month Warranty: Backed by a 12-month manufacturer warranty for peace of mind. Designed to meet strict quality control standards for reliable everyday performance.
What each operation does
cv2.absdiff(before, after)computes the absolute difference for each corresponding array element. OpenCV documents this operation in its 4.13.0 array operations reference.- Converting the difference to grayscale reduces the three color channels to one intensity value for thresholding.
cv2.threshold()marks values above the selected cutoff as white and the rest as black. OpenCV’s 4.13.0 thresholding tutorial describes thresholding methods.- The mask selects pixels to color red in the second screenshot. OpenCV uses BGR channel order, so
(0, 0, 255)is red.
OpenCV’s array operations reference also documents compare(), which produces 255 at positions where a per-element comparison condition is true. Thresholding the grayscale difference is a practical way to make a binary candidate-change mask.
Interpret the output without mistaking noise for a bug
Open diff.png, mask.png, and highlight.png alongside the original screenshots. A thresholded mask helps locate pixels whose differences exceed the cutoff, but it does not measure visual importance or establish that the page is broken.
Rank #2
- 5-in-1 USB-C Hub: Experience comprehensive connectivity featuring a Power Delivery input, two USB-A 2.0 ports, a USB-A 3.0 port, and an HDMI port. (Note: The USB-C power delivery input port is only for connecting an external wall charger to power your laptop and cannot power peripheral devices.)
- 90W Pass-Through Charging: Achieve optimal charging with 90W pass-through power to your laptop, supported by a total input of 100W, with the hub reserving 10W for operational efficiency. (Note: Wall charger not included.)
- Quick Data Transfers: Accelerate your productivity with rapid data transfers using a high-speed 5Gbps USB 3.0 port and two 480Mbps USB 2.0 ports.
- 4K HDMI Display: Enhance your visual experience with a hub capable of delivering 4K resolution at 30Hz in both mirror and extend modes. Please note that this hub is compatible with MacBook (macOS 12 and newer), Windows 10 and 11, ChromeOS, and laptops equipped with DP Alt Mode and Power Delivery. Note: This device is not compatible with Linux.
- What You Get: Anker USB-C Hub (5-in-1, 4K HDMI), welcome guide, 18-month warranty, and our friendly customer service.
- One-pixel shifts: Text and edges can light up broadly even when the underlying content changed very little. Recheck alignment and capture conditions.
- Rendering variation: Differences in fonts, animation state, image loading, or dynamic page content can appear in the mask. Stabilize those inputs if the goal is to find page changes.
- Small details: Raising the cutoff may hide subtle changes; lowering it may include more rendering noise. Inspect results and tune the cutoff against the screenshots your project produces.
- Changed dimensions: Do not resize automatically if a size change is meaningful, such as a changed page height. If it is not meaningful, choose and document a deliberate alignment or crop strategy before comparing.
For regions rather than individual pixels, you can group neighboring mask pixels into connected regions or use contours, then draw boxes around those regions. Filter tiny regions only with care: a small text change may matter. The exact grouping and filtering behavior depends on the implementation, so inspect the result against both original images.
Choose pixel diffs or a histogram comparison
These approaches answer different questions. OpenCV’s official histogram comparison tutorial describes six comparison metrics.
What’s actually slowing this PC down?
Pick the symptom - the matching free tool is one click away.
Rank #3
- Sleek 7-in-1 USB-C Hub: Features an HDMI port, two USB-A 3.0 ports, and a USB-C data port, each providing 5Gbps transfer speeds. It also includes a USB-C PD input port for charging up to 100W and dual SD and TF card slots, all in a compact design.
- Flawless 4K@60Hz Video with HDMI: Delivers exceptional clarity and smoothness with its 4K@60Hz HDMI port, making it ideal for high-definition presentations and entertainment. (Note: Only the HDMI port supports video projection; the USB-C port is for data transfer only.)
- Double Up on Efficiency: The two USB-A 3.0 ports and a USB-C port support a fast 5Gbps data rate, significantly boosting your transfer speeds and improving productivity.
- Fast and Reliable 85W Charging: Offers high-capacity, speedy charging for laptops up to 85W, so you spend less time tethered to an outlet and more time being productive.
- What You Get: Anker USB-C Hub (7-in-1), welcome guide, 18-month warranty, and our friendly customer service.
| Approach | What it answers | Useful when | Limitation |
|---|---|---|---|
absdiff plus threshold |
Where do pixels differ beyond a cutoff? | You need a localized visual mask to inspect changed regions. | Sensitive to alignment and rendering variation; the cutoff needs tuning. |
| Histogram comparison | How similar are the overall image distributions? | A coarse image-level comparison score is sufficient. | Does not identify where a UI region changed. |
For visual regression work where the location of a change matters, a histogram score is not a substitute for a difference image or mask. A 2026 paper’s abstract on web UI visual regression discusses challenges for pixel-level methods involving layout diversity, dense text, and fine-grained changes; this is an abstract-level limitation finding, not a benchmark of OpenCV or a claim about every implementation. See Beyond Pixel Diffs: Benchmarking Image Change Captioning for Web UI Visual Regression Testing.
Troubleshoot common comparison problems
- “Could not read both screenshots”: Confirm the filenames and working directory, and verify that the files are readable images.
cv2.imread()returns no image when reading fails. - The screenshots have different sizes: Decide whether the size difference matters. If it does, treat it as a result rather than forcing an array comparison. If it does not, align them by a deliberate crop or resize and compare the resulting same-sized arrays.
- Almost the whole page is highlighted: Check viewport, device scale, scroll position, and page loading state first. A shift or changed capture conditions can make edges and text differ across large areas.
- The mask is too noisy: Try a higher threshold, but review small text and details that may disappear. There is no universal cutoff; evaluate it against your project’s screenshots.
- The mask misses a subtle change: Try a lower threshold and inspect the raw difference image. Lower thresholds can also admit more rendering variation.
- The diff is hard to interpret: Compare the mask and highlighted image with both source screenshots. The raw diff communicates pixel variation, not which page change matters.
Or skip the browser setup
If you still need to capture the screenshots, ScreenshotNeo is a website screenshot API and MCP server. It provides PNG, JPEG, WebP, or PDF captures; you can then compare the saved images with OpenCV as above. One GET request looks like this:
Quick Recap
Best Value
- 5-in-1 Connectivity: Equipped with a 4K HDMI port, a 5 Gbps USB-C data port, two 5 Gbps USB-A ports, and a USB C 100W PD-IN port. Note: The USB C 100W PD-IN port supports only charging and does not support data transfer devices such as headphones or speakers.
- Powerful Pass-Through Charging: Supports up to 85W pass-through charging so you can power up your laptop while you use the hub. Note: Pass-through charging requires a charger (not included). Note: To achieve full power for iPad, we recommend using a 45W wall charger.
- Transfer Files in Seconds: Move files to and from your laptop at speeds of up to 5 Gbps via the USB-C and USB-A data ports. Note: The USB C 5Gbps Data port does not support video output.
- HD Display: Connect to the HDMI port to stream or mirror content to an external monitor in resolutions of up to 4K@30Hz. Note: The USB-C ports do not support video output.
- What You Get: Anker 332 USB-C Hub (5-in-1), welcome guide, our worry-free 18-month warranty, and friendly customer service.
Rank #4
- Dual Converters, Infinite Potential:Includes 2× USB C male to USB A female adapters and 2× USB A male to USB C female adapters. Perfect for a wide range of uses—tablets with Bluetooth keyboards, expand USB ports on macbook, and more. Two different converters for all your daily needs
- Next-Level 10Gbps & 3A Charging: No more slow 480Mbps, this usb to usb c adapter has a transfer speed of up to 10Gbps, allowing you to do more transferring in less time. This usb adapter fits both USB A and USB C charger, supporting up to 3A fast charging
- Upgraded Exquisite Craftsmanship: With an aluminum alloy housing and metal connector, the usbc to usb adapter is extremely durable and sturdy. Rigorously tested to withstand more than 10,000 times of plugging and unplugging, ensuring long-lasting performance
- Broad Compatible: The usb c to usb adapter widely supports all USB C/ USB A devices like laptops, tablets, cellphones, car chargers, and phone chargers. Such as compatible with MacBook Pro/Air 2023/2022, Thunderbolt 4/3 Devices,Apple MagSafe Watch 9/8/7/SE/Ultra, iPad Pro 2022/2021, Samsung Galaxy S23/S20/S10, and iPhone 17/16/15 Pro. Plug and play
- Please Note: To reach 10Gbps speed, keep the cable under 3.3 ft. For USB A Male to USB C adapters, try flipping the USB C connector. USB C Male to USB A adapters support bidirectional 10Gbps transfer within 3.3 ft
curl -G "https://api.screenshotneo.com/v1/shot" -d access_key=YOUR_API_KEY --data-urlencode url=https://stripe.com -o shot.webp
See the ScreenshotNeo API documentation for request options. ScreenshotNeo accepts cookie and consent banners before capture and removes more than 60 known consent platforms, newsletter popups, and chat widgets; each step can be turned off. Bot checks and CAPTCHAs, blank pages, timeouts, failed loads, and cache hits cost nothing, and responses include X-Page-Verdict and X-Billed headers. Its MCP server offers take_screenshot, get_page_info, and capture_pdf for Claude, Cursor, and other MCP clients. The Free plan includes 1,000 screenshots per month with no card; paid plans start at $5 for 3,000 shots. Sign up for ScreenshotNeo free.
Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

