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

Add diff percentage to output #24

Merged
merged 1 commit into from
Apr 1, 2021
Merged

Add diff percentage to output #24

merged 1 commit into from
Apr 1, 2021

Conversation

eWert-Online
Copy link
Collaborator

@eWert-Online eWert-Online commented Mar 31, 2021

This adds the diff in percentage to the output.
The format now is "Different pixels: 7586 (1.137331%)"

Output

Fixes #8

@dmtrKovalenko
Copy link
Owner

dmtrKovalenko commented Mar 31, 2021

Thanks! This is a nice addition, we need to also think about how we will return this information to the parent process (e.g. we have bindings to nodejs)

@dmtrKovalenko dmtrKovalenko self-requested a review March 31, 2021 21:20
@eWert-Online
Copy link
Collaborator Author

eWert-Online commented Apr 1, 2021

Ah you are right. I didnt see that there were node bindings.

As far as I can see, the difference in pixels is also not returned to node, right?
So we would need to think about a general solution for returning both pixels and the percentage to node.

I will see if I can think of something later today :)

@dmtrKovalenko
Copy link
Owner

Thanks! I think this PR is good to go, I will merge this. For the return perspective, I think we need to just print the output to stdout and then parse in node.

So basically print something like 14254;2.456 and in node take this string and split it by ";" and use values. I'd like to avoid any buffers, streams, or IPC but if you have any idea – Id like to hear! :)

@dmtrKovalenko dmtrKovalenko merged commit c406eda into dmtrKovalenko:main Apr 1, 2021
@eWert-Online eWert-Online deleted the diff-percentage branch April 1, 2021 09:36
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.

Difference in Procentage
2 participants