Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Diff swallows black color in added areas #34

Open
cburgmer opened this issue May 4, 2014 · 4 comments
Open

Diff swallows black color in added areas #34

cburgmer opened this issue May 4, 2014 · 4 comments

Comments

@cburgmer
Copy link
Contributor

cburgmer commented May 4, 2014

In a diff with two unequal images, added pixels in black are not distinguishable. They are swallowed by the otherwise black background, the result of the diff of same pixels.

Test case: http://jsfiddle.net/cburgmer/79pr2/4/

@B2F
Copy link

B2F commented Mar 17, 2015

I had another case where the diff image's pixels are not distinguishable, the difference is there and correctly detected (a subtle one), but the resulting image is all black, probably the same issue.

@B2F
Copy link

B2F commented Mar 17, 2015

I can confirm the issue. Here is the example:
diff
As you can see the lines are off by few pixels, I was able to highlight the imagediff pixels in gimp with the pixel color selection in gimp.

@B2F
Copy link

B2F commented Apr 17, 2015

I've fixed the problem with a options.lightness for imagediff.diff, I should post a pull request this week end.

B2F added a commit to B2F/js-imagediff that referenced this issue Apr 18, 2015
…ows black color in added areas). Default +25 color light value.
@B2F
Copy link

B2F commented Apr 18, 2015

Here are some screenshots illustrating the fix, all taken with Succss (The CSS regression testing tool I'm doing).
category--contact-menu--1366x768
With the default value 25 it is now visible but still subtle depending on your screen type and settings.
category--contact-menu--1366x768
The above uses options.lightness manually set to 100.
category--contact-menu--1366x768
And with the maximum boost 255 everywhere, area of differences are now obvious.

I also factorised the rgb color diffing code and tested it for diffUnequal (with option.align set to 'top') as well:
diffunequal-align-top.

Please review my pull request #51.

While the previous PR can be used per project, another, much better and stable pull request is in the work.

B2F added a commit to B2F/js-imagediff that referenced this issue Apr 22, 2015
…dds options.ligthness, options.rgb and options.stack to customize the diff image.
B2F added a commit to B2F/js-imagediff that referenced this issue Apr 23, 2015
…dds options.ligthness, options.rgb and options.stack to customize the diff image.

Updates Jasmine ImageDiffSpec with new diff options
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants