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

odiff-bin. outputDiffMask result is opposite #49

Open
pashidlos opened this issue Jun 29, 2021 · 5 comments
Open

odiff-bin. outputDiffMask result is opposite #49

pashidlos opened this issue Jun 29, 2021 · 5 comments

Comments

@pashidlos
Copy link

from docs:

  /** Output full diff image. */
  outputDiffMask: boolean;

Actual:

  • outputDiffMask: false -> full image with diff
  • outputDiffMask: true -> only diff
    1
@eWert-Online
Copy link
Collaborator

@pashidlos
Just to clarify, you would expect the docs comment to be changed, right?
The option itself is named correctly and is doing what is expected.

@dmtrKovalenko
Copy link
Owner

Yeah I think we need to simply update doc and jsdoc

@pashidlos
Copy link
Author

pashidlos commented Jun 30, 2021

@eWert-Online for me the diff mask is the image around highlighted pixels
so when I would like to draw the mask I expect to see not only diff pixels but also matched pixels
when diff output mask is disabled I expect to see only diff pixels
I would invert current option behaviour as for me doc text looks fine
please, let me know if I misunderstand the concept

@eWert-Online
Copy link
Collaborator

To me a mask is something you can overlay on top of some other thing, to hide parts of it.

In our case, if you overlay the diff mask on top of your original image, you are "hiding" the pixels which are different.
You can compare it to a Bitmask (https://en.wikipedia.org/wiki/Mask_(computing)#Common_bitmask_functions), which also uses a mask to "hide" specific bits in the original bit sequence.

So to me the concept as it is currently implemented is correct.
I would only change the comment, to explain it a bit better 🙂

@dmtrKovalenko
Copy link
Owner

Yes agreed with @eWert-Online mask is used when you have an original image a new one and you can render diff mask on top of the original image to show diff pixels in order to not store simmilar pixels

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

3 participants