romankh3 / image-comparison

Published on Maven Central Java Library that compares 2 images with the same sizes and shows the differences visually by drawing rectangles. Some parts of the image can be excluded from the comparison. Can be used for automation QA tests.
https://t.me/romankh3
Apache License 2.0
343 stars 105 forks source link

[FEATURE] Client can change color of rectangle for difference / excluded part. #205

Closed woosyume closed 3 years ago

woosyume commented 3 years ago

Is your feature request related to a problem? Please describe.

What

As a new feature, I'm suggesting that client can set color for rectangles with the difference.

Background

About my case, When we release something, we run image comparison for before and after deployment. It's job of internal automation app based on Selenium WebDriver.

But we sometime take time to find diff rectangle when it's exists because there are some other parts with red colored. Maybe you can see it with the following page. https://www.rakuten.co.jp/

That's why I want to set other color so that we can find difference as soon as possible.

Detail

Describe the solution you'd like Add a public method to ImageComparison.java to set color. Sample

    public Color setDiffRectangleColor(Color color) {
        this.color = color;
        return this;
    }
...
        graphics.setColor(this.color);

Describe alternatives you've considered Nothing special.

Additional context Nothing special.

woosyume commented 3 years ago

Currently I'm working with this but don't have permission to push to working branch remotely. Could you grant me? @romankh3

romankh3 commented 3 years ago

Hello @woosyume. Thanks for your contributions. In GitHub we're using The forking workflow branching strategy to contribute to another repository. In a nutshell, you need to fork image-comparison, make updates in the development branch and create pull-request to development branch in original image-comparison project.

woosyume commented 3 years ago

I've created a pull request following the above rule. Please kindly check it. Regards, Kim

romankh3 commented 3 years ago

merged to the development branch.

romankh3 commented 3 years ago

@woosyume thanks for your contribution to the image-comparison project. Your updated added to the 4.4.0 version and can be retrieved.

thanks, Roman.