stefanjudis / grunt-photobox

Grunt plugin for creating screenshots of any site and compare them
MIT License
276 stars 22 forks source link

Only show screenshots when there are differences (optional) #32

Open sgabler opened 9 years ago

sgabler commented 9 years ago

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.

stefanjudis commented 9 years ago

Jap, definitely would be useful.

Can not promise in near future though. But I'm looking for contributors. :bowtie:

danielhusar commented 9 years ago

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 :)

stefanjudis commented 9 years ago

@danielhusar that would be pure awesomeness!

sgabler commented 9 years ago

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:

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)

stefanjudis commented 9 years ago

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?