Meta tags:
description= A very fast SIMD-first image comparison library (with nodejs API) - dmtrKovalenko/odiff;
Headings (most frequently used words):
navigation, saved, searches, odiff, files, from, license, footer, the, pixel, node, js, uh, oh, search, code, repositories, users, issues, pull, requests, provide, feedback, dmtrkovalenko, menu, use, to, filter, your, results, more, quickly, folders, and, latest, commit, history, repository, why, demo, features, usage, server, mode, using, other, frameworks, api, installation, benchmarks, changelog, about, releases, 37, contributors, languages, fastest, one, thread, by, image, difference, tool, in, world, basic, comparison, playwright, cypress, visual, regression, services, cli, cross, platform, binaries, topics, resources, stars, watchers, forks,
Text of the page (most frequently used words):
png (56), odiff (46), the (44), and (33), diff (27), image (26), for (24), compare (24), #comparison (20), images (19), server (19), with (17), #cypress (15), path (15), you (14), github (13), visual (13), odiffserver (13), will (12), string (12), all (11), www (11), output (11), number (11), param (11), code (11), security (10), your (10), reason (10), match (10), this (9), water (9), platform (9), file (9), options (9), test (9), const (9), difference (8), from (8), different (8), can (7), that (7), license (7), pixel (7), use (7), package (7), boolean (7), view (7), zig (6), are (6), false (6), true (6), timeout (6), await (6), pixels (6), more (6), support (6), enterprise (6), not (5), navigation (5), reload (5), page (5), first (5), api (5), have (5), here (5), regression (5), run (5), install (5), bin (5), name (5), binary (5), node (5), automatically (5), process (5), promise (5), buffer (5), optional (5), base (5), using (5), new (5), playwright (5), json (5), build (5), search (5), time (4), community (4), readme (4), resources (4), testing (4), tool (4), very (4), fast (4), simd (4), nodejs (4), src (4), another (4), solutions (4), example (4), per (4), binaries (4), export (4), stop (4), odiffresult (4), odiffoptions (4), diffoutput (4), format (4), jpg (4), containing (4), any (4), type (4), features (4), logo (4), actions (4), quality (4), issues (4), typescript (3), there (3), was (3), error (3), please (3), stars (3), mit (3), snapshot (3), topics (3), changelog (3), imagemagick (3), pixelmatch (3), even (3), just (3), benchmarks (3), release (3), npm (3), but (3), cross (3), one (3), provide (3), see (3), return (3), why (3), call (3), when (3), comparisons (3), jpeg (3), tiff (3), webp (3), data (3), comparepath (3), basepath (3), create (3), instance (3), threshold (3), add (3), memory (3), uses (3), services (3), simple (3), message (3), files (3), workflows (3), commit (3), open (3), dmtrkovalenko (3), insights (3), pull (3), requests (3), signed (3), settings (3), tab (3), window (3), refresh (3), session (3), sign (3), saved (3), documentation (3), feedback (3), grade (3), copilot (3), explore (3), perform (2), manage (2), terms (2), footer (2), 2026 (2), while (2), loading (2), releases (2), latest (2), dev (2), repository (2), forks (2), 111 (2), library (2), read (2), details (2), yes (2), compose (2), relative (2), max (2), min (2), mean (2), command (2), faster (2), larger (2), let (2), find (2), screenshots (2), full (2), size (2), performance (2), other (2), world (2), cases (2), 25000 (2), hours (2), like (2), running (2), month (2), help (2), important (2), way (2), make (2), sure (2), directly (2), used (2), only (2), safe (2), compareformat (2), comparebuffer (2), baseformat (2), basebuffer (2), resolving (2), result (2), returns (2), request (2), bmp (2), paths (2), two (2), initialization (2), persistent (2), binarypath (2), immediately (2), declare (2), diff2 (2), async (2), diff1 (2), each (2), work (2), spawn (2), module (2), start (2), multiple (2), line (2), indexes (2), diffpercentage (2), diffcount (2), layout (2), array (2), regions (2), less (2), color (2), interface (2), date (2), cli (2), written (2), ocaml (2), allows (2), screenshot (2), argos (2), setup (2), simply (2), requestid (2), input (2), ready (2), usage (2), protocol (2), second (2), require (2), mode (2), application (2), direct (2), generated (2), kitty (2), sse2 (2), avx2 (2), avx512 (2), neon (2), results (2), designed (2), typos (2), toml (2), test_output (2), test_bmp_diff_output (2), lock (2), light (2), dark (2), diff_output (2), diff_mask (2), zon (2), bench (2), txt (2), gitignore (2), scripts (2), npm_packages (2), 315 (2), commits (2), last (2), menu (2), projects (2), discussions (2), appearance (2), cancel (2), available (2), searches (2), repositories (2), business (2), advanced (2), developer (2), source (2), customer (2), devops (2), app (2), merge (2), action, share, personal, information, cookies, contact, docs, status, privacy, inc, shell, assembly, javascript, languages, contributors, jul, report, watching, watchers, activity, hacktoberfest, perfect, about, project, licensed, under, recently, updated, what, has, changed, significant, improvement, produced, same, commands, 981, 936, 951, 014, 394, 819, 326, 436, 910, 398, 614, 162, wow, times, than, clearer, become, 185, 157, 168, 008, 066, 692, 881, 121, magick, 896, 664, 712, 069, https, popular, going, some, real, 3600, 83333, matters, least, sort, tasks, snapshots, save, speeding, seconds, yourself, instructions, how, benchmark, download, then, give, try, itself, recommended, lib, compiled, executable, contains, script, link, right, current, post, prebuilt, most, platforms, few, ways, them, installation, created, option, identical, otherwise, were, void, should, called, done, comparebuffers, always, prefer, saving, disk, anyway, buffers, actual, encoded, bytes, waits, needed, constructor, defaults, bundled, begins, background, class, multiplexed, core, parallel, several, independent, workers, absolutely, fine, keep, sever, leaving, root, result2, 5000, catch, possible, crashes, side, result1, initializes, overhead, stays, alive, reuses, need, avoid, diffpath, function, errored, exists, difflines, individual, guaranteed, ordered, distinct, percentage, whole, amount, ignoreregions, ignore, reduceramusage, slower, capturedifflines, contain, set, antialiasing, antialiased, counted, precise, nofailonfserrors, instead, throwing, missing, failonlayoutdiff, produce, diffoverlay, outputs, white, shaded, overlay, easier, reading, outputdiffmask, diffcolor, highlight, hex, cd2cc9, partial, pretty, tiny, well, best, get, reference, config, based, declaration, define, built, collaborator, osnap, self, hosted, service, engine, tracker, holistic, frontend, easy, integration, storybook, lostpixel, modern, became, websites, mobile, apps, design, systems, checkout, plugin, tests, doc, tohavescreenshotodiff, expect, import, entrypoint, frameworks, 1090946, response, signal, pure, readline, stdio, cleanup, gracefully, close, exits, sigints, scope, lazy, load, provides, long, lasting, runtime, reduce, spend, forking, initializing, child, works, also, binding, img1, img2, supported, formats, omitted, displays, terminals, graphics, ghostty, iterm2, wezterm, warp, wayst, xterm, konsole, basic, 100, coverage, backward, compatibility, controlled, footprint, optimized, working, determine, yiq, ntsc, transmission, algorithm, ignoring, anti, aliasing, detection, supports, layouts, without, problems, demo, originally, currently, optimizations, blazing, native, check, compares, between, specifically, handle, significantly, similar, photos, many, portable, efficient, milliseconds, fastest, thread, items, history, folders, tags, branches, main, additional, star, fork, must, change, notification, notifications, public, dismiss, alert, switched, accounts, out, resetting, focus, qualifiers, our, query, filter, quickly, submit, include, email, address, contacted, every, piece, take, seriously, syntax, tips, clear, users, jump, pricing, premium, ons, powered, collections, trending, archive, program, accelerator, maintainer, lab, programs, fund, developers, sponsors, partners, trust, center, forum, skills, ebooks, reports, events, webinars, stories, software, development, topic, industries, government, manufacturing, financial, healthcare, industry, devsecops, modernization, case, nonprofits, startups, small, medium, teams, enterprises, company, marketplace, blog, leaks, before, they, secret, protection, secure, fix, vulnerabilities, enforce, changes, review, plan, track, instant, environments, codespaces, automate, workflow, integrate, external, tools, mcp, registry, agents, issue, write, better, creation, toggle, skip, content,
Text of the page (random words):
github dmtrkovalenko odiff a very fast simd first image comparison library with nodejs api github skip to content navigation menu toggle navigation sign in appearance settings platform ai code creation github copilot write better code with ai github copilot app direct agents from issue to merge mcp registry new integrate external tools developer workflows actions automate any workflow codespaces instant dev environments issues plan and track work code review manage code changes code quality enforce quality at merge application security github advanced security find and fix vulnerabilities code security secure your code as you build secret protection stop leaks before they start explore why github documentation blog changelog marketplace view all features solutions by company size enterprises small and medium teams startups nonprofits by use case app modernization devsecops devops ci cd view all use cases by industry healthcare financial services manufacturing government view all industries view all solutions resources explore by topic ai software development devops security view all topics explore by type customer stories events webinars ebooks reports business insights github skills support services documentation customer support community forum trust center partners view all resources open source community github sponsors fund open source developers programs security lab maintainer community accelerator github stars archive program repositories topics trending collections enterprise enterprise solutions enterprise platform ai powered developer platform available add ons github advanced security enterprise grade security features copilot for business enterprise grade ai features premium support enterprise grade 24 7 support pricing search or jump to search code repositories users issues pull requests search clear search syntax tips provide feedback we read every piece of feedback and take your input very seriously include my email address so i can be contacted cancel submit feedback saved searches use saved searches to filter your results more quickly name query to see all available qualifiers see our documentation cancel create saved search sign in sign up appearance settings resetting focus you signed in with another tab or window reload to refresh your session you signed out in another tab or window reload to refresh your session you switched accounts on another tab or window reload to refresh your session dismiss alert message dmtrkovalenko odiff public notifications you must be signed in to change notification settings fork 111 star 3 1k code issues 13 pull requests 2 discussions actions projects security and quality 0 insights additional navigation options code issues pull requests discussions actions projects security and quality insights dmtrkovalenko odiff main branches tags go to file code open more actions menu folders and files name name last commit message last commit date latest commit history 315 commits 315 commits github workflows github workflows images images npm_packages npm_packages scripts scripts src src test test gitignore gitignore license txt license txt readme md readme md bench sh bench sh build zig build zig build zig zon build zig zon diff_mask png diff_mask png diff_output png diff_output png odiff logo dark png odiff logo dark png odiff logo light png odiff logo light png package lock json package lock json package json package json release sh release sh test_bmp_diff_output png test_bmp_diff_output png test_output png test_output png typos toml typos toml view all files repository files navigation readme mit license more items the fastest one thread pixel by pixel image difference tool in the world why odiff odiff is a blazing fast native image comparison tool check benchmarks for the results but it compares the visual difference between 2 images in milliseconds odiff is designed specifically to handle significantly similar images like screenshots photos ai generated images and many more odiff is designed to be portable fast and memory efficient originally written in ocaml currently in zig with simd optimizations for sse2 avx2 avx512 and neon demo base comparison diff features cross format comparison yes jpg vs png comparison without any problems support for png jpeg jpg webp and tiff supports comparison of images with different layouts anti aliasing detection ignoring regions using yiq ntsc transmission algorithm to determine visual difference simd optimized working for sse2 avx2 avx512 and neon controlled memory footprint 100 test coverage and backward compatibility usage basic comparison run the simple comparison image paths can be one of supported formats diff output is optional and can only be png when diff output is omitted odiff displays the generated diff directly in terminals that support the kitty graphics protocol ghostty iterm2 kitty wezterm warp wayst xterm js and konsole odiff img1 path img2 path diff output path node js we also provide direct node js binding for the odiff run the odiff from nodejs const compare require odiff bin const match reason await compare path to first image png path to second image png path to diff png server mode odiff provides a server mode for the long lasting runtime application to reduce a time you have to spend on forking and initializing child process on each odiff call from node js it works as simply as const odiffserver require odiff bin it is safe to run from the module scope as it will automatically lazy load and will cleanup and gracefully close on exits sigints const odiffserver new odiffserver const match reason await odiffserver compare path to first image png path to second image png path to diff png for the pure binary usage this is a simple readline stdio protocol with json message here is a simple example odiff server odiff server ready true ready signal your input requestid 1 base images www cypress io png compare images www cypress io 1 png output images www cypress diff png server response requestid 1 match false reason pixel diff diffcount 1090946 diffpercentage 2 95 using from other frameworks playwright just install playwright odiff and simply in your setup file or test entrypoint import playwright odiff setup expect page tohavescreenshotodiff screenshot name any odiff and playwright options more details at playwright odiff doc cypress checkout cypress odiff a cypress plugin to add visual regression tests using odiff bin visual regression services argos argos is the modern visual testing platform for websites mobile apps and design systems it uses odiff for comparison it became 8x faster with odiff lostpixel holistic visual testing for your frontend that allows very easy integration with storybook and uses odiff for comparison visual regression tracker self hosted visual regression service that allows to use odiff as screenshot comparison engine osnap snapshot testing tool written in ocaml that uses config based declaration to define test and was built by odiff collaborator api here is an api reference cli the best way to get up to date cli interface is just to type the odiff help node js nodejs api is pretty tiny as well here is a typescript interface we have export type odiffoptions partial color used to highlight different pixels in the output in hex format e g cd2cc9 diffcolor string output full diff image outputdiffmask boolean outputs diff images with a white shaded overlay for easier diff reading diffoverlay boolean number do not compare images and produce output if images layout is different failonlayoutdiff boolean return match false reason instead of throwing error if file is missing nofailonfserrors boolean color difference threshold from 0 to 1 less more precise threshold number if this is true antialiased pixels are not counted to the diff of an image antialiasing boolean if true reason pixel diff output will contain the set of line indexes containing different pixels capturedifflines boolean if true odiff will use less memory but will be slower with larger images reduceramusage boolean an array of regions to ignore in the diff ignoreregions array x1 number y1 number x2 number y2 number export type odiffresult match true match false reason layout diff match false reason pixel diff amount of different pixels diffcount number percentage of different pixels in the whole image diffpercentage number individual line indexes containing different pixels guaranteed to be ordered and distinct difflines number match false reason file not exists errored file path file string declare function compare basepath string comparepath string diffpath string options odiffoptions promise odiffresult odiffserver persistent server instance for multiple comparisons use this when you need to perform multiple image comparisons to avoid process spawn overhead the server process stays alive and reuses resources the server initializes automatically on first compare call so you can create an instance and start using it immediately example ts const server new odiffserver const result1 await server compare a png b png diff1 png add optional timeout to catch any possible crashes on the server side const result2 await server compare c png d png diff2 png threshold 0 3 timeout 5000 server stop it is absolutely fine to keep odiff sever leaving in the module root even if you have several independent workers it will automatically spawn a server process per each multiplexed core to work in parallel example typescript const odiffserver new odiffserver test visual test 1 async await odiffserver compare a png b png diff1 png test visual test 2 async await odiffserver compare c png d png diff2 png export declare class odiffserver create a new odiffserver instance server initialization begins immediately in the background param binarypath optional path to odiff binary defaults to bundled binary constructor binarypath string compare two images using the persistent server automatically waits for server initialization if needed param basepath path to base image param comparepath path to comparison image param diffoutput path to output diff image param options comparison options with optional timeout for request returns promise resolving to comparison result compare basepath string comparepath string diffoutput string options odiffoptions timeout number promise odiffresult compare two images buffers the buffer data is the actual encoded file bytes important always prefer file paths compare if you are saving images to disk anyway param basebuffer buffer containing base image data param baseformat format of base image png jpeg jpg bmp tiff webp param comparebuffer buffer containing compare image data param compareformat format of compare image png jpeg jpg bmp tiff webp param diffoutput path to output diff image param options comparison options with optional timeout for request returns promise resolving to comparison result comparebuffers basebuffer buffer baseformat string comparebuffer buffer compareformat string diffoutput string options odiffoptions timeout number promise odiffresult stop the odiff server process should be called when done with all comparisons safe to call even if server is not running stop void export compare odiffserver compare option will return match true if images are identical otherwise return match false reason with a reason why images were different make sure that diff output file will be created only if images have pixel difference we can see installation we provide prebuilt binaries for most of the used platforms there are a few ways to install them cross platform the recommended and cross platform way to install this lib is npm and node js make sure that this package is compiled directly to the platform binary executable so the npm package contains all binaries and post install script will automatically link the right one for the current platform important package name is odiff bin but the binary itself is odiff npm install odiff bin then give it a try odiff help from binaries download the binaries for your platform from release page benchmarks run the benchmarks by yourself instructions on how to run the benchmark is here performance matters at least for sort of tasks like visual regression for example if you are running 25000 image snapshots per month you can save 20 hours of ci time per month by speeding up comparison time in just 3 seconds per snapshot 3s 25000 3600 20 83333 hours here is odiff performance comparison with other popular visual difference solutions we are going to compare some real world use cases let s compare 2 screenshots of full size https cypress io page command mean s min s max s relative pixelmatch www cypress io 1 png www cypress io png www cypress diff png 7 712 0 069 7 664 7 896 6 67 0 03 imagemagick compare www cypress io 1 png www cypress io png compose src diff magick png 8 881 0 121 8 692 9 066 7 65 0 04 odiff www cypress io 1 png www cypress io png www cypress diff png 1 168 0 008 1 157 1 185 1 00 wow odiff is 6 times faster than imagemagick and pixelmatch and this will be even clearer if image will become larger let s compare an 8k image to find a difference with another 8k image command mean s min s max s relative pixelmatch water 4k png water 4k 2 png water diff png 10 614 0 162 10 398 10 910 5 50 0 05 imagemagick compare water 4k png water 4k 2 png compose src water diff png 9 326 0 436 8 819 10 394 5 24 0 10 odiff water 4k png water 4k 2 png water diff png 1 951 0 014 1 936 1 981 1 00 yes it is significant improvement and the produced difference will be the same for all 3 commands changelog if you have recently updated please read the changelog for details of what has changed license the project is licensed under the terms of mit license about a very fast simd first image comparison library with nodejs api topics diff visual snapshot pixel perfect image comparison hacktoberfest testing tool odiff resources readme license mit license uh oh there was an error while loading please reload this page activity stars 3 1k stars watchers 18 watching forks 111 forks report repository releases 37 v4 4 3 dev 2 latest jul 22 2026 36 releases contributors uh oh there was an error while loading please reload this page languages zig 68 0 typescript 14 2 javascript 11 8 c 2 4 assembly 2 1 shell 1 5 footer 2026 github inc footer navigation terms privacy security status community docs contact manage cookies do not share my personal information you can t perform that action at this time
|