-
Notifications
You must be signed in to change notification settings - Fork 99
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
Fixes #34 (Diff swallows black color in added areas): adds options.ligth... #52
base: master
Are you sure you want to change the base?
Conversation
…dds options.ligthness, options.rgb and options.stack to customize the diff image. Updates Jasmine ImageDiffSpec with new diff options
I updated Jasmine specs to take the new options into account, adding three new steps. All pass locally. |
This is awesome, I'm currently having an issue with this as well. Any idea on when this will be merged? |
@SyntaxStacks thanks for your feedback on this. I think it could speed up the process if I make the Jasmine tests pass without altering existing specs, Carl would like to increase the version number before merging the pull request because of this. Since the pull request is still available for review, I was thinking of replacing the new options: I already have a local update accordingly and I would like to update the PR with it, are you ok with these changes ? |
Those sound fine, send it on up 👍 |
…52#issuecomment-101045835)
PR updated, features list:
Existing specs are unaltered, it should be good for next release. We need Carl's review though. |
@@ -313,13 +313,28 @@ describe('ImageUtils', function() { | |||
|
|||
it('should calculate difference', function () { | |||
a = imagediff.createImageData(1, 1), | |||
a.data[1] = 200, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
semicolon instead of a comma at the end of the line? I haven't come across this syntax before.
👍 |
@see PR features update (changes default values and options names but below screenshots still relevant).
The fix for #34 is the same but with improved factoring and commented code:
I also improved #51 with two more or less useful functionalities found in resemble.js.
As examples, I'll give you some tests I've made from images found at http://humblesoftware.github.io/js-imagediff/.
.example.normal, default behavior without options, the +25 boost is not much altering the original rendering in this case:
.example.transparency, +25 default boost is giving a slightly white transparent background:
.example.size, still default behavior, I just set option.align manually to top:
.example.normal, now setting options.lightness to 255 (all differences are clearly visible):
.example.transparency, using options.rgb with [0,0,255] to give a blue tint in area zone:
.example.normal, setting options.stack and options.rgb to [185,0,185] giving a purple rendering on common pixels like with resemble.js:
.example.size, option.align center and options.stack and yellow balance (options.rgb=[255,255,0]):
The previous images are generated by Succss, ask me if you want the configuration file to reproduce locally. Thanks !