Skip to Content
New: codec-png-native and codec-png-wasm bring the blazediff-png codec to Node and WebAssembly, faster than spng and jSquash. Read more β†’
Comparevs dssim

BlazeDiff vs dssim

The blazediff-ssim crate computes MS-SSIM ~6.6x faster than dssim, and it is MIT-licensed, while dssim is AGPL-3.0 or commercial. The two answer related but different questions. dssim is a perceptual quality metric for tuning image codecs. BlazeDiff SSIM is a similarity score for visual tests.

dssim computes multi-scale SSIM in L*a*b* color space, scales in linear light, and reads color profiles. Its score is 1/SSIM βˆ’ 1, so 0 means identical and the value has no upper limit. blazediff-ssim computes luma SSIM that follows the MATLAB reference implementations, and it scores from 0 to 1.

At a glance

dssimBlazeDiff (blazediff-ssim)
LicenseAGPL-3.0, or a commercial licenseMIT
DeliveryRust crate, CLI, C libraryRust crate, Node addon (ssim-native), JavaScript, Python
InputPNG and JPEG in the CLI; RGBA in the libraryRGBA in the crate; PNG, JPEG and QOI in ssim-native
ColorL*a*b* with chroma, color profilesLuma; perceptual-ssim adds L*a*b* chroma
ScoreDSSIM, 0 = identical, unboundedSSIM, 1 = identical
VariantsOne multi-scale metricSSIM, MS-SSIM, Hitchhiker’s SSIM, perceptual SSIM
ThreadsMulti-core by defaultSingle-threaded; you run images in parallel

Benchmarks

dssim runs single-threaded here, so both sides use one core. dssim is a different algorithm, so the chart compares cost, not scores. Decode is excluded.

Rust (blazediff-ssim vs dssim) (image IO excluded)

TOTAL TIME, BEST-OF Β· 16 FIXTURES Β· IO EXCLUDED

BlazeDiffOther librariesLower is better

dssim is a different algorithm (multi-scale, Lab chroma), so this compares cost, not scores.

Apple M1 Max Β· darwin/arm64 Β· Node v22.14.0 Β· rustc 1.97.1 (8bab26f4f 2026-07-14) Β· best-of, iterations scaled by image size, dssim single-threaded Β· 2026-10-22 Β· 234b300-dirty Β· pnpm benchmark ssim-dssim

Per-fixture results (16)
FixtureMPxdssimssimms-ssimhitchhikersssim vs dssimms-ssim vs dssimhitchhikers vs dssim
4k/117.91.78s99.32ms250ms131ms17.93x7.13x13.63x
4k/220.01.80s117ms279ms162ms15.35x6.45x11.12x
4k/324.02.31s159ms331ms172ms14.55x6.98x13.46x
alpha/10.04.10ms0.47ms0.75ms0.23ms8.74x5.46x17.67x
blazediff/10.431.47ms5.15ms5.89ms2.88ms6.11x5.34x10.91x
blazediff/20.426.45ms1.54ms4.95ms2.29ms17.16x5.35x11.58x
blazediff/31.6113ms5.07ms22.99ms11.21ms22.24x4.90x10.05x
blazediff/43.8252ms12.28ms52.49ms24.92ms20.53x4.80x10.12x
pixelmatch/10.111.75ms1.54ms2.10ms0.82ms7.65x5.60x14.27x
pixelmatch/20.16.89ms0.76ms1.21ms0.42ms9.08x5.67x16.57x
pixelmatch/30.111.61ms1.59ms2.19ms0.87ms7.28x5.29x13.30x
pixelmatch/40.215.28ms0.78ms2.60ms1.17ms19.50x5.87x13.03x
pixelmatch/50.16.70ms0.76ms1.21ms0.41ms8.84x5.53x16.19x
pixelmatch/60.16.68ms0.75ms1.21ms0.41ms8.95x5.52x16.13x
pixelmatch/70.319.53ms1.07ms3.56ms1.64ms18.27x5.48x11.89x
same/11.7120ms5.76ms24.75ms11.50ms20.86x4.85x10.45x
TOTAL6.51s413ms986ms523ms15.78x6.61x12.46x

Switching

use blazediff_ssim::{ms_ssim, MsSsimOptions, Plane, Rgba8, SsimOptions}; let base = Plane::from_rgba8(Rgba8::new(&rgba1, width, height))?; let current = Plane::from_rgba8(Rgba8::new(&rgba2, width, height))?; let outcome = ms_ssim(&base, &current, &SsimOptions::default(), &MsSsimOptions::default())?; println!("{:.6}", outcome.score); // 1.0 means identical

A dssim threshold does not convert to an SSIM threshold. Score your own fixtures with the new metric and pick the threshold from those scores.

When to keep dssim

  • You tune image codecs or compression settings. dssim was validated on TID2013 for that job.
  • You need color-profile handling, or errors that only show in chroma.
  • Your project is already AGPL, or you bought the commercial license.
Last updated on