looks-same icon indicating copy to clipboard operation
looks-same copied to clipboard

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

Open chrisdeely opened this issue 7 years ago • 8 comments

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 avatar Oct 20 '17 01:10 chrisdeely

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

kisenka avatar Oct 25 '18 12:10 kisenka

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

chrisdeely avatar Oct 26 '18 13:10 chrisdeely

Could this provide a fix for https://github.com/gemini-testing/looks-same/pull/59 ?

drairi avatar Sep 27 '19 11:09 drairi

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!

JoshuaM1995 avatar Jan 23 '23 03:01 JoshuaM1995

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

drairi avatar Jan 23 '23 07:01 drairi

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

DudaGod avatar Jan 23 '23 10:01 DudaGod

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 avatar Jan 23 '23 14:01 chrisdeely

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 avatar Jan 27 '23 04:01 chrisdeely