Skip to content

Commit

Permalink
Make it easier to diff images.
Browse files Browse the repository at this point in the history
  • Loading branch information
Hixie committed Jun 21, 2018
1 parent e492084 commit eb27268
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 0 deletions.
1 change: 1 addition & 0 deletions .gitattributes
@@ -0,0 +1 @@
*.png diff=image
10 changes: 10 additions & 0 deletions README.md
@@ -1,3 +1,13 @@
A repository for golden image files that are used by tests in https://github.com/flutter/flutter.

See: https://github.com/flutter/flutter/wiki/Writing-a-golden-file-test-for-package%3Aflutter

## Getting diffs for golden images

If you have ImageMagick and you want to use it to show diffs of files
in this repo, add the following to your `~/.gitconfig`:

```
[diff "image"]
command = /path/to/this/repo/diff-images.sh
```
2 changes: 2 additions & 0 deletions diff-images.sh
@@ -0,0 +1,2 @@
#!/bin/sh
compare $2 $1 png:- | montage -geometry +4+4 $2 - $1 png:- | display -title "$1" -

0 comments on commit eb27268

Please sign in to comment.