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

fix #10 with the addition of a transparency option #30

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

chrisdeely
Copy link
Contributor

@chrisdeely chrisdeely commented Oct 20, 2017

Uses a matchingPixelAlpha option for looksSame.createDiff to control the alpha of unchanged pixels.

This necessitated including the alpha channel in color comparisons in order to properly validate the diif images are rendered properly.

@chrisdeely chrisdeely mentioned this pull request Oct 20, 2017
Copy link
Member

@sipayRT sipayRT left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

But if you use alpha channel in compare functions so you need to do it in antialiasing too. It's embarrassing that in different places we are compare images in different way

test/test.js Outdated Show resolved Hide resolved
@kisenka
Copy link

kisenka commented Oct 25, 2018

@chrisdeely are you planning to update your PR according to requested changes? If not, I can do it :) This feature will be very handy!

@chrisdeely
Copy link
Contributor Author

@kisenka I'll happily let you take the reigns here! I obviously have not gotten back to this in a timely manner

@drairi
Copy link

drairi commented Sep 27, 2019

Could this provide a fix for #59 ?

@JoshuaM1995
Copy link

I know this is a few years old, but is there anyway to merge this in? I don't know much about the library but I'll help if possible. I'm working on a visual change detection app for websites and transparency would really help me!

@drairi
Copy link

drairi commented Jan 23, 2023

@JoshuaM1995 that would be lovely! there has been some activity in this repo recently, so maybe it'll happen!

@DudaGod
Copy link
Member

DudaGod commented Jan 23, 2023

Hello guys. I will try to look at this on this week.

… control the alpha of unchanged pixels
@chrisdeely
Copy link
Contributor Author

i'm taking a look at this - the repo has moved on quite a bit since I initially made this PR, I'll see if I can adapt it to the new style

@chrisdeely
Copy link
Contributor Author

I have updated my branch to re-implement this feature according to the new code style & features. the tests are all passing and the new matchingPixelAlpha option should allow users to visually remove matching pixels from the diff images.

Since the library now supports more image formats than just png, the alpha channel is defaulted to 255 if no value is present in the source image.

I have not tested the impact on antialiasing detection, but if there are issues there, please let me know and I'll try to help out.

@chrisdeely chrisdeely requested a review from sipayRT February 2, 2023 20:21
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

Successfully merging this pull request may close these issues.

6 participants