odiff icon indicating copy to clipboard operation
odiff copied to clipboard

odiff-bin. outputDiffMask result is opposite

Open pashidlos opened this issue 4 years ago • 5 comments

from docs:

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

Actual:

  • outputDiffMask: false -> full image with diff
  • outputDiffMask: true -> only diff 1

pashidlos avatar Jun 29 '21 11:06 pashidlos

@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.

eWert-Online avatar Jun 29 '21 14:06 eWert-Online

Yeah I think we need to simply update doc and jsdoc

dmtrKovalenko avatar Jun 29 '21 16:06 dmtrKovalenko

@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

pashidlos avatar Jun 30 '21 14:06 pashidlos

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 🙂

eWert-Online avatar Jul 01 '21 07:07 eWert-Online

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

dmtrKovalenko avatar Jul 01 '21 07:07 dmtrKovalenko