-
-
Notifications
You must be signed in to change notification settings - Fork 760
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
Blendmodes #515
Blendmodes #515
Conversation
@@ -422,44 +430,70 @@ export function composite(src, x, y, cb) { | |||
return throwError.call(this, 'x and y must be numbers', cb); | |||
} | |||
|
|||
let { mode, opacitySource, opacityDest } = options; |
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.
Can you add a test with these new params ?
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.
test added! it's only 1 can be more thorough if needed
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.
I would prefer to have a test that will expect the whole image to be equal to a base image so that we have more certainty that it will break fast if the code is wrong (like you've done in : https://github.com/oliver-moran/jimp/pull/524/files#diff-c632bfb61a4e129216f938dcb8d1a782R126)
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.
@edi9999 I added a better test but for some reason my bitmaps were always off by 1 before writing. The new test writes to the filesystem and checks those buffers.
544c777
to
24f19ef
Compare
What's Changing and Why
Allows users to composite image in different ways similar to gimp.
closes #139
copied code from #191
What else might be affected
Nothing.
Tasks
jimp.d.ts