-
-
Notifications
You must be signed in to change notification settings - Fork 106
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
Implement BMP version compareImages_BMP() method for issue#153 #221
base: master
Are you sure you want to change the base?
Conversation
add alternative BMP comparison method
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's a lot to review, I will do it later.
Please, fix the comments which I created.
public ImageComparisonResult compareImages_BMP() { | ||
|
||
// check that the images have the same size | ||
if (isImageSizesNotEqual(expected, actual)) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This logic have code duplicate. Please. provide solution for using it from one place.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think adding a param to compareImages() method to indicate whether using the BMP version could help...
I mean I just tried to avoid "breaking change" at first.
Thanks for comments, I will check and fix the code for the near term.
* | ||
* @return the result of the drawing. | ||
*/ | ||
public ImageComparisonResult compareImages_BMP() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please, rename method to be more java friendly.
For example compareImagesBMP or similar.
* [work for issue #153] | ||
* a class to store 3 bytes RGB values in a pixel | ||
*/ | ||
private class RGB_tuple{ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please, rename it to RgbTuple.
PR Details
Description
Related Issue
Motivation and Context
This work is aim to improve the performance of image-comparison, by getting RGB as bytes and removing binary operations in isDifferentPixels method.
How Has This Been Tested
Add a new test file called BMPTest.java, in which I designed some test to test feasibility and speed differernces.
Types of changes
Checklist