lcs-image-diff

Crates.iolcs-image-diff
lib.rslcs-image-diff
version0.1.7
sourcesrc
created_at2018-02-16 00:36:06.80309
updated_at2019-01-06 14:10:13.811966
descriptionImage diff tool with LCS algorithm
homepage
repositoryhttps://github.com/bokuweb/lcs-image-diff-rs
max_upload_size
id51350
size82,793
bokuweb (bokuweb)

documentation

README

lcs-image-diff

Image diff library and tool with LCS algorithm. rust port of murooka/go-diff-image

CircleCI

Requirements

  • latest Rust (recommend rustup)

Library

Usage

# Cargo.toml
[dependencies]
image = "0.20"
lcs-image-diff = { version = "0.1", default-features = false }
use lcs_image_diff::compare;

let mut before = image::open("before.png")?;
let mut after = image::open("after.png")?;

let diff = compare(&mut before, &mut after, 100.0 / 256.0)?;

before.save("marked_before.png")?;
after.save("marked_after.png")?;
diff.save("diff.png")?;

Binary

Installation

cargo install lcs-image-diff

Usage

lcs-image-diff path/to/before.png path/to/after.png path/to/diff.png

Example

before.png after.png diff.png

lcs-image-diff outputs marked before and after images too.

marked_before.png marked_after.png

LICENSE

The MIT License (MIT)

Copyright (c) 2018 @bokuweb

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Commit count: 25

cargo fmt