grunt-photobox
grunt-photobox copied to clipboard
Only show screenshots when there are differences (optional)
It would be nice to have the option to only show the screenshots on the summary page if they are different. For other cases it could show "No differences detected".
This should be configurable.
The benefit is that you filter out the irrelevant screenshots.
Jap, definitely would be useful.
Can not promise in near future though. But I'm looking for contributors. :bowtie:
Looks useful to me as well. Im quite busy at the moment, but I can take a look on implementing this at the end of the next week :)
@danielhusar that would be pure awesomeness!
I looked at the code out of curiosity and tried to understand how everything is connected. Here's my first idea on how to solve this with ImageMagick:
- The diff image will be completely white when there are no changes
- This means that the total amount of colors will be 1
- By running
identify -format "%k" image.png
i was able to get the amount of colors - If the result is
1
, then we could exclude this diff from the result page
Not sure if this is a good approach, as I am completely new to ImageMagick. What do you guys think about this?
(EDIT: Found a better command to determine the amount of colors in the image)
Hey thanks for jumping in. :bowtie:
I'd say, I read something about a compare command. Never tried it though - maybe that's a bit cleaner?
http://www.imagemagick.org/Usage/compare/
Then the images could be compared and only if differences are present the diff image would be generated.
What do you think?