pixelhog
Rust-accelerated pixelmatch and SSIM for PNG bytes
Decision gist · record as of 2026-08-14
Yes, if you need fast visual regression testing on Python 3.12+. The Rust implementation, zero runtime dependencies, and comprehensive API (diff, SSIM, clustering, thumbnails) make it a solid choice for screenshot-based QA. Medium install friction is acceptable for the performance gain. No known vulnerabilities. Verify platform wheel availability for your specific Python version and OS before committing.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Requires Python 3.12 or later; compiled Rust extension must be available for your platform.
- Medium install friction due to compiled Rust extension; prebuilt wheels available for Python 3.12+ on common platforms (macOS x86/ARM, Linux x86/ARM, Windows x86, musl).
- Last release 101 days ago; repository active with recent commits.
License · maintenance · safety
permissive license (permissive) — MIT licensed (permissive); no restrictions on commercial or proprietary use.
last release 2026-05-05 (101 days) · last repo commit 2026-06-30 · 1 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 2,061,327 downloads/mo, #3,331 on PyPI
Alternatives
Verify before relying
from pixelhog import Comparison
cmp = Comparison(baseline_png_bytes, current_png_bytes)
count = cmp.diff_count()
score = cmp.ssim()
diff_png = cmp.diff_image()
result = cmp.clusters(dilation=8, merge_gap=60)- Whether prebuilt wheels cover all target platforms (musl/glibc variants, Python 3.13/3.14 support status).
- Performance characteristics on large images or batch workloads relative to pure-Python alternatives.
- Exact behavior of anti-alias handling and threshold tuning in diff_count().
What it is and what it does
Pixelhog is a Rust-backed Python library for comparing pairs of PNG images in two complementary ways: exact pixel-level diff (with anti-alias handling) and structural similarity (SSIM) scoring. It decodes images once at construction and exposes methods on demand through a stateful Comparison object, avoiding redundant I/O. The library also provides spatial clustering to identify where changes occurred, early-exit checks to fail fast on large diffs, and WebP thumbnail generation.
It is designed for visual regression testing in screenshot-based workflows. The package includes batch operations for parallel comparison of many image pairs, support for pre-decoded RGBA buffers (zero-copy), and automatic padding of mismatched image sizes. It has no runtime dependencies beyond the Rust extension itself.
Use it for
- Automated visual regression testing in UI frameworks to detect unintended rendering changes between baseline and current screenshots.
- Batch processing of many screenshot pairs in parallel to identify which regions of a page changed and by how much.
- Generating diff visualizations and spatial heatmaps to pinpoint layout or styling regressions in web or desktop applications.
- Computing perceptual similarity scores to tolerate minor rendering variations (anti-aliasing, compression) while catching real visual bugs.
- Creating WebP thumbnails of screenshots for archival or reporting without additional image processing dependencies.
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes, if you need fast visual regression testing on Python 3.12+.
The Rust implementation, zero runtime dependencies, and comprehensive API (diff, SSIM, clustering, thumbnails) make it a solid choice for screenshot-based QA. Medium install friction is acceptable for the performance gain. No known vulnerabilities. Verify platform wheel availability for your specific Python version and OS before committing.
Install
pixelhog on PyPI
Before you install
Medium install friction due to compiled Rust extension; prebuilt wheels available for Python 3.12+ on common platforms (macOS x86/ARM, Linux x86/ARM, Windows x86, musl). Last release 101 days ago; repository active with recent commits.
Requires Python 3.12 or later; compiled Rust extension must be available for your platform.
License in practice
MIT licensed (permissive); no restrictions on commercial or proprietary use.
Quickstart
from pixelhog import Comparison
cmp = Comparison(baseline_png_bytes, current_png_bytes)
count = cmp.diff_count()
score = cmp.ssim()
diff_png = cmp.diff_image()
result = cmp.clusters(dilation=8, merge_gap=60)
Verify before relying
- Whether prebuilt wheels cover all target platforms (musl/glibc variants, Python 3.13/3.14 support status).
- Performance characteristics on large images or batch workloads relative to pure-Python alternatives.
- Exact behavior of anti-alias handling and threshold tuning in diff_count().
Package facts
| License | permissive license permissive |
| Python support | Supports the current Python release >=3.12 |
| Install friction | Medium. Platform-specific wheel |
| Runtime dependencies | None |
| Maintenance | Actively maintained 101 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 2,061,327 / month, #3,331 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | Development Status :: 5 - Production/StableLicense :: OSI Approved :: MIT LicenseOperating System :: OS IndependentProgramming Language :: Python :: 3Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.14Programming Language :: Rust |
Evidence: pixelhog-1.2.0-cp312-abi3-macosx_10_12_x86_64.whl; pixelhog-1.2.0-cp312-abi3-macosx_11_0_arm64.whl; pixelhog-1.2.0-cp312-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl; pixelhog-1.2.0-cp312-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl; pixelhog-1.2.0-cp312-abi3-musllinux_1_2_aarch64.whl; pixelhog-1.2.0-cp312-abi3-musllinux_1_2_x86_64.whl; pixelhog-1.2.0-cp312-abi3-win_amd64.whl
Tags
Let your AI agent find packages like this
Example. Real query, live index.
You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.
wish › “SSIM scoring”
- pixelhogCompares PNG screenshots pixel-by-pixel and perceptually using…
- pyiqaPyIQA provides a PyTorch-based toolbox for computing image quality…
- pytorch-msssimComputes fast, differentiable SSIM and MS-SSIM metrics for PyTorch…
Give your agent the search over MCP, or paste the wish link into any chat.
More Quality Assurance packages
Coverage.py measures which lines of Python code are executed during test runs, reporting coverage percentages and identifying untested code paths.
Install it if you want to measure test completeness or enforce coverage thresholds in your project.
Ruff is a Python linter and code formatter written in Rust that combines linting, formatting, and code fixing into a single tool, replacing Flake8, Black, isort, and related utilities.
Pexpect spawns and controls interactive console applications by sending input and matching output patterns, automating tasks that would otherwise require manual interaction.
Black reformats Python source code to a consistent style by parsing entire files and rewriting them according to an opinionated, deterministic set of rules, eliminating manual formatting decisions.
pytest-xdist distributes pytest tests across multiple CPU cores or machines to speed up test execution, with the simplest usage being `pytest -n auto` to spawn workers equal to available CPUs.
Install it if your test suite takes long enough that parallelization would save meaningful time.
Validates AWS CloudFormation templates in YAML or JSON format against resource provider schemas and best practices, checking property values and configuration correctness.
Install it if you work with CloudFormation templates.
See also lpips · pixelmatch · pyoxipng · pytest-playwright-visual · image-similarity-measures · imagededup · piq · pixeloe · moviepilot-rust · fig2sketch