{"id":28045,"library":"pixelhog","title":"pixelhog","description":"Rust-accelerated pixelmatch and SSIM for PNG bytes. Current version 1.2.0, active development, monthly releases.","status":"active","version":"1.2.0","language":"python","source_language":"en","source_url":"https://github.com/PostHog/pixelhog","tags":["image-comparison","pixelmatch","ssim","rust","png","diff"],"install":[{"cmd":"pip install pixelhog","lang":"bash","label":"PyPI install"}],"dependencies":[],"imports":[{"wrong":"from pixelhog import ssim","symbol":"pixelhog","correct":"from pixelhog import pixelhog"},{"symbol":"BoundingBox","correct":"from pixelhog import BoundingBox"},{"symbol":"compare_batch","correct":"from pixelhog import compare_batch"}],"quickstart":{"code":"from pixelhog import ssim, pixelmatch\n\npng_a = open('a.png', 'rb').read()\npng_b = open('b.png', 'rb').read()\n\n# Compare two PNGs and get diff image bytes\ndiff_png, score = pixelmatch(png_a, png_b)\nprint(f'SSIM: {ssim(png_a, png_b)}')","lang":"python","description":"Compare two PNG byte strings and get diff image plus SSIM score."},"warnings":[{"fix":"Use 'from pixelhog import pixelmatch' instead of 'from pixelhog.diff import pixelmatch'.","message":"Version 1.0.0 removed the legacy 'pixelhog.diff' module. All functions are now top-level.","severity":"breaking","affected_versions":"<1.0.0"},{"fix":"Use 'output_format' instead of 'format' when upgrading to 2.0.","message":"The 'webp_thumbnail' parameter in pixelmatch was added in 1.1.0, but the 'format' parameter is being replaced by 'output_format' in 2.0.","severity":"deprecated","affected_versions":">=1.1.0,<2.0.0"},{"fix":"Open files in binary mode and pass the bytes: open('img.png', 'rb').read()","message":"Input must be raw PNG bytes (bytes object), not file paths or PIL images.","severity":"gotcha","affected_versions":"all"}],"env_vars":null,"search_vec":"'1.2.0':13 'acceler':4 'activ':14 'byte':10 'comparison':20 'current':11 'develop':15 'diff':25 'imag':19 'image-comparison':18 'month':16 'pixelhog':1 'pixelmatch':5,21 'png':9,24 'releas':17 'rust':3,23 'rust-acceler':2 'ssim':7,22 'version':12","created_at":"2026-05-09T05:53:26.701067+00:00","updated_at":"2026-05-09T05:53:26.701067+00:00","problems":null,"ecosystem":"pypi","meta_description":null,"install_score":null,"quickstart_score":null,"quickstart_tag":null,"pypi_latest":null,"cli_name":"","cli_version":null,"type":"library","homepage":null,"github":"https://github.com/PostHog/pixelhog","docs":null,"changelog":null,"pypi":"https://pypi.org/project/pixelhog/","npm":null,"openapi_spec":null,"status_page":null,"smithery":null,"categories":["data","ai-ml"],"base_url":null,"auth_type":null,"provenance":{"verified_status":"passing","verified_at":"2026-07-03","last_verified":"2026-07-03","next_check":"2026-08-02","install_tag":null}}