Currently working on Datasette and associated projects. Read my blog or follow @[email protected]
on Mastodon.
simonw / image-diff Goto Github PK
View Code? Open in Web Editor NEWCLI tool for comparing images
License: Apache License 2.0
CLI tool for comparing images
License: Apache License 2.0
Currently working on Datasette and associated projects. Read my blog or follow @[email protected]
on Mastodon.
I'm assuming this is a fault on my end that the core functionality does not work outright or I'm misunderstanding something. I've created a virtual environment, installed image-diff
, and am trying to produce a differential image exactly as in the documentation, but the resulting image is seemingly empty. I've tried using both PNG and JPG as the input image formats, but it makes no difference.
Here are the two images I'm using just so that we're on the same page and here is the supposed differential between the two.
I'm using Python 3.10.7 on Fedora 36.
While trying to write tests for #1 I found it surprisingly hard to create test PNG images exactly how I wanted them.
This command. will let me compile an image from a JSON description.
This is a crufty way of doing that which seems to work:
len([p for p in diff.getdata() if p != (0, 0, 0)])
My original inspiration for this tool was that I wanted to run a CI job that checked if an image had changed by more than a certain amount.
A command that varies its exit code based on the size of the difference could solve this.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.