Skip to main content

High-performance image diffing with block-based optimization and SIMD

Project description

blazediff

High-performance image diffing with block-based optimization and SIMD acceleration.

Crates.io License: MIT

Features

  • Block-based optimization - Skip identical regions for massive speedups on similar images
  • SIMD acceleration - Native SSE4.1 (x86) and NEON (ARM) implementations
  • Multiple formats - PNG, JPEG, and QOI support
  • Perceptual diffing - YIQ-based color difference with antialiasing detection
  • Cross-platform - Linux, macOS, and Windows support

Installation

cargo install blazediff

CLI Usage

# Basic diff
blazediff image1.png image2.png -o diff.png

# With custom threshold (0.0 - 1.0)
blazediff image1.png image2.png -o diff.png -t 0.1

# JSON output for scripting
blazediff image1.png image2.png --json

Library Usage

use blazediff::{diff, DiffOptions};

let options = DiffOptions {
    threshold: 0.1,
    include_anti_aliased: false,
    ..Default::default()
};

let result = diff("image1.png", "image2.png", Some("diff.png"), &options)?;
println!("Different pixels: {}", result.diff_count);

Interpret

Structured region analysis that takes a raw pixel diff and produces human-readable change descriptions. Available via --interpret in the CLI or interpret() in the library.

See INTERPRET.md for the full algorithm documentation — pipeline stages, formulas, classification rules, and output format.

Performance

3-4x faster than odiff, 8x faster than pixelmatch on 4K images.

License

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

blazediff-4.2.0-cp38-abi3-win_arm64.whl (490.5 kB view details)

Uploaded CPython 3.8+Windows ARM64

blazediff-4.2.0-cp38-abi3-win_amd64.whl (492.8 kB view details)

Uploaded CPython 3.8+Windows x86-64

blazediff-4.2.0-cp38-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (637.9 kB view details)

Uploaded CPython 3.8+manylinux: glibc 2.17+ x86-64

blazediff-4.2.0-cp38-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (608.2 kB view details)

Uploaded CPython 3.8+manylinux: glibc 2.17+ ARM64

blazediff-4.2.0-cp38-abi3-macosx_11_0_arm64.whl (554.4 kB view details)

Uploaded CPython 3.8+macOS 11.0+ ARM64

blazediff-4.2.0-cp38-abi3-macosx_10_12_x86_64.whl (569.3 kB view details)

Uploaded CPython 3.8+macOS 10.12+ x86-64

File details

Details for the file blazediff-4.2.0-cp38-abi3-win_arm64.whl.

File metadata

  • Download URL: blazediff-4.2.0-cp38-abi3-win_arm64.whl
  • Upload date:
  • Size: 490.5 kB
  • Tags: CPython 3.8+, Windows ARM64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: maturin/1.13.1

File hashes

Hashes for blazediff-4.2.0-cp38-abi3-win_arm64.whl
Algorithm Hash digest
SHA256 620da8e4abdfb9600833a7a9091e93dac950c593d271c6231a38c334b5474a59
MD5 21ec4cfb7d8a529ac297e4ce5fafbc5c
BLAKE2b-256 680ade393091e75a232f366684844f08fcc6dd4ed487490dcf6a85d6634d0ed7

See more details on using hashes here.

File details

Details for the file blazediff-4.2.0-cp38-abi3-win_amd64.whl.

File metadata

  • Download URL: blazediff-4.2.0-cp38-abi3-win_amd64.whl
  • Upload date:
  • Size: 492.8 kB
  • Tags: CPython 3.8+, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: maturin/1.13.1

File hashes

Hashes for blazediff-4.2.0-cp38-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 287da929220781c00cc59b6e3440832ebc226ce0951e60bd93fda359ff772144
MD5 92df684709fc6cb113245a10f62814ae
BLAKE2b-256 911d480d0c941b69e156adc7584abe666b9f421eebb6c39e1112fbd23941975a

See more details on using hashes here.

File details

Details for the file blazediff-4.2.0-cp38-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for blazediff-4.2.0-cp38-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 6589970d780abaf9796972cd1ad11384f5335a14467df32a6dd3f8c7cebae3f1
MD5 6cdc84501821c506ab1e5208312c679c
BLAKE2b-256 d1c420edfb1a3f3b2d9d6022612b67767e0603398ad08bc43b5d4d2e2661ae0b

See more details on using hashes here.

File details

Details for the file blazediff-4.2.0-cp38-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.

File metadata

File hashes

Hashes for blazediff-4.2.0-cp38-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 8dad942c1e629200084d8d84991a739eacfece0128ce53399315c833c11b6d00
MD5 7614c37363e61d343a5fb2c251025566
BLAKE2b-256 280114a8c9145bd700ef8b55d479261acd108ccb4da4eb35164fef513c6356db

See more details on using hashes here.

File details

Details for the file blazediff-4.2.0-cp38-abi3-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for blazediff-4.2.0-cp38-abi3-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 6b3d6381a13074cb1e355edd784146cc35195e5901b8e3b7af33205b9e667536
MD5 ea79a48ced75d30272623017887a5fbc
BLAKE2b-256 439b6d29bf002b086ff1ccab984ffb9c43514583f4c6bf425170d75ac8c6ab43

See more details on using hashes here.

File details

Details for the file blazediff-4.2.0-cp38-abi3-macosx_10_12_x86_64.whl.

File metadata

File hashes

Hashes for blazediff-4.2.0-cp38-abi3-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 14641b17eb756027b4b8634364a7dec68ebf9e23ce999207b6d423236858d874
MD5 1875afd233bed9bbe7db0afd854428df
BLAKE2b-256 a1cfdd80cc1cf111c719bc97cabeb719adc47493a4360d4b0d78a7c0ba392639

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page