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

Faulty diff calculation for transparency #11

Closed
cburgmer opened this issue Sep 11, 2012 · 3 comments
Closed

Faulty diff calculation for transparency #11

cburgmer opened this issue Sep 11, 2012 · 3 comments

Comments

@cburgmer
Copy link
Contributor

Hey, while looking for something unrelated I stumbled upon this line of code:

cData[i+3] = Math.abs(255 - aData[i+3] - bData[i+3]);

I think what we want is this:

cData[i+3] = Math.abs(255 - Math.abs(aData[i+3] - bData[i+3]));
@hardchor
Copy link

hardchor commented Nov 7, 2012

Agreed, I observed that comparison of transparent fields doesn't seem to work as expected.

@cburgmer
Copy link
Contributor Author

See pull request #19

@cburgmer
Copy link
Contributor Author

cburgmer commented Mar 7, 2014

PR is merged.

@cburgmer cburgmer closed this as completed Mar 7, 2014
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