Skip to content

xshoji/go-diff-image

 
 

Repository files navigation

go-diff-image

A diff tool for images.

Installation

$ go get github.com/xshoji/go-diff-image

Usage

$ ./diff-image -h
Usage: ./diff-image [OPTIONS] [-h, --help]

Description:
  A diff tool for images.

Options:
  -a, --after-image-path string     (REQ) Image path (after)
  -b, --before-image-path string    (REQ) Image path (before)
  -o, --output string               (REQ) Output path of difference image
  -e, --error-if-difference         Be regarded as an error (status code 1) if difference exists"
  -n, --not-output-if-same          Not output difference image if inputs are same

./diff-image -o=/tmp/d.png -b=/tmp/s1.png -a=/tmp/s2.png

Example

example

Build

# Build
$ GOOS=darwin GOARCH=amd64 go build -ldflags="-s -w" -trimpath -o /tmp/diff-image cmd/diff-image/main.go

# Croess compile by goreleaser
#   goreleaser --version
#   GitVersion:    2.5.0
goreleaser build --snapshot --clean

Release

Release flow of this repository is integrated with github action. Git tag pushing triggers release job.

# Release
git tag v0.0.2 && git push --tags



# Delete tag
echo "v0.0.1" |xargs -I{} bash -c "git tag -d {} && git push origin :{}"

# Delete tag and recreate new tag and push
echo "v0.0.1" |xargs -I{} bash -c "git tag -d {} && git push origin :{}; git tag {} -m \"Release beta version.\"; git push --tags"

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Go 98.7%
  • Shell 1.3%