Skip to content

Hashing images is so 90's. Numerically calculate the visual differences between images.

Notifications You must be signed in to change notification settings

lukasmwerner/py-image-diff

Repository files navigation

Py-Image-Diff

A simple python image difference library. It returns the % difference of the image. Additionally, it also saves the visual differences to a file called diff.png.

Here is a sample image of the visual difference:

The difference will be in red.

Left-hand Side Difference between left and right images Right-hand Side
A picture showing the difference between a hand drawn chart

Usage

To use the library you need to build the .so. Here is the go building command: go build -o lib.so -buildmode=c-shared library.go

Usage of the library is really simple. The only exported function is compare.

import imagediff

with open("a.png", 'rb') as a:
    with open("b.png", 'rb') as b:
        difference = library.compare(a.read(), b.read())
        print(difference)

About

Hashing images is so 90's. Numerically calculate the visual differences between images.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published