Registry / data / pixelhog

pixelhog

JSON →
library1.2.0pypypi✓ verified 79d ago

Rust-accelerated pixelmatch and SSIM for PNG bytes. Current version 1.2.0, active development, monthly releases.

pip install pixelhog
INSTALL
IMPORT
SIG · PIXELHOG
P
pixelhog
datapythonv1.2.0
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

pixelhog
from pixelhog import pixelhog
from pixelhog import ssim
BoundingBox
from pixelhog import BoundingBox
compare_batch
from pixelhog import compare_batch

Compare two PNG byte strings and get diff image plus SSIM score.

from pixelhog import ssim, pixelmatch png_a = open('a.png', 'rb').read() png_b = open('b.png', 'rb').read() # Compare two PNGs and get diff image bytes diff_png, score = pixelmatch(png_a, png_b) print(f'SSIM: {ssim(png_a, png_b)}')
Debug
Known issues
breakingVersion 1.0.0 removed the legacy 'pixelhog.diff' module. All functions are now top-level.
fix
Use 'from pixelhog import pixelmatch' instead of 'from pixelhog.diff import pixelmatch'.
affects: <1.0.0
deprecatedThe 'webp_thumbnail' parameter in pixelmatch was added in 1.1.0, but the 'format' parameter is being replaced by 'output_format' in 2.0.
fix
Use 'output_format' instead of 'format' when upgrading to 2.0.
affects: >=1.1.0,<2.0.0
gotchaInput must be raw PNG bytes (bytes object), not file paths or PIL images.
fix
Open files in binary mode and pass the bytes: open('img.png', 'rb').read()
affects: all
Upgrade
Version history
1.2.0latest on PyPI · released May 5, 2026
Audit
Dependencies

No dependency data recorded yet.

Agent activity
2 hits · last 30 days
node
2
Resources
pixelhog — pip install pixelhog · libregistry