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

Expose resemble's options in config file and don't scaleToSameSize by default #176

Conversation

rafaeldalsanto
Copy link
Contributor

@rafaeldalsanto rafaeldalsanto commented May 4, 2023

We should not scale the images to the same size when comparing them because, by definition, if they have different sizes, they are not equal. Scaling introduces distortions that make it difficult to identify the actual problem.

Also, in this merge request, we exposed Resemble's options in the RobotEyes config file. This way, the user can change the parameters used to compare the images according to their needs. We needed this because some images were not passing the integration tests due to small differences caused by the browser's anti-aliasing.

We should not scale to the same size when comparing images because if they have different sizes, they are not equal by definition. The scaling introduces distortions that make it hard to find the real problem.
@rafaeldalsanto rafaeldalsanto requested a review from jklemm May 4, 2023 20:17
@rafaeldalsanto rafaeldalsanto self-assigned this May 4, 2023
Copy link
Contributor

@jklemm jklemm left a comment

Choose a reason for hiding this comment

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

It makes no sense to scale the image to compare. I agree that images with different sizes are different, it wouldn't even need to see the image to conclude that.

Very nice 🚀

@rafaeldalsanto rafaeldalsanto changed the title Set scaleToSameSize to false when comparing images. Expose resemble's options in config file and don't scaleToSameSize by default May 10, 2023
@rafaeldalsanto rafaeldalsanto merged commit 3af271f into master May 10, 2023
@rafaeldalsanto rafaeldalsanto deleted the improvement/should-not-scale-to-same-size-when-comparing-images branch May 10, 2023 14:33
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.

None yet

2 participants