Skip to content

Commit

Permalink
## 4.0.0
Browse files Browse the repository at this point in the history
*   refactored drawRectangles method due to SRP.
*   optimized isDifferentPixels to improve algorithm.
*   moved to Apache License 2.0
*   removed Point and used java.awt.Point instead
*   added Gradle.yml for GitHub actions
*   removed commandLine usage
*   renamed ComparisonResult to ImageComparisonResult
*   renamed ComparisonState to ImageComparisonState
*   added own RuntimeException for wrapping checked exception
*   added Gitter chat for communication.
  • Loading branch information
romankh3 committed Dec 9, 2019
1 parent b2e442e commit c6989f5
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 37 deletions.
42 changes: 8 additions & 34 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,44 +60,17 @@ Can be found in [RELEASE_NOTES](RELEASE_NOTES.md).

## Usage

### Using the command-line

This library can be used as a command-line utility to compare two images.

After building with `./gradlew jar`, you will find the runnable jar at `${projectDir}/build/libs`.

To compare two images in files `a.png` and `b.png`, for example, run:

```bash
java -jar image-comparison.jar a.png b.png
```

To save the result image in a third file, say `comparison.png`, just give that file as a third argument:

```bash
java -jar image-comparison.jar a.png b.png comparison.png
```

To show more usage details, run:

```bash
java -jar image-comparison.jar -h
```

### Using as a Java library

#### Dependency
##### Maven
#### Maven
```xml
<dependency>
<groupId>com.github.romankh3</groupId>
<artifactId>image-comparison</artifactId>
<version>3.3.1</version>
<version>4.0.0</version>
</dependency>
```
##### Gradle
#### Gradle
```groovy
compile 'com.github.romankh3:image-comparison:3.3.1'
compile 'com.github.romankh3:image-comparison:4.0.0'
```

#### To compare two images programmatically
Expand Down Expand Up @@ -177,11 +150,11 @@ This will compile, run the tests, and create a runnable jar at `${projectDir}/bu

Demo shows how `image-comparison` works.

### Expected Image(ex image1)
### Expected Image

![expected](https://user-images.githubusercontent.com/16310793/28955567-52edeabe-78f0-11e7-8bb2-d435c8df23ff.png)

### Actual Image(ex image 2)
### Actual Image

![actual](https://user-images.githubusercontent.com/16310793/28955566-52ead892-78f0-11e7-993c-847350da0bf8.png)

Expand All @@ -196,11 +169,12 @@ Please, follow [Contributing](CONTRIBUTING.md) page.
Please, follow [Code of Conduct](CODE_OF_CONDUCT.md) page.

## License
This project is unlicense - see the [LICENSE](LICENSE) file for details
This project is Apache License 2.0 - see the [LICENSE](LICENSE) file for details

#### Thanks [@dee-y](https://github.com/dee-y) for designing this logo

#### Also if you're interesting - see my other repositories
* [skyscanner-flight-api-clinet](https://github.com/romankh3/skyscanner-flight-api-client) - Client for a Skyscanner Flight Search API hosted in Rapid API
* [Flights Monitoring](https://github.com/romankh3/flights-monitoring) - app for monitoring flights cost based on Skyscanner API
* [Raspberry home ecosystem](https://github.com/romankh3/raspberrypi-home-ecosystem) - home ecosystem based on raspberry pi.
* [Movie Tracking](https://github.com/romankh3/movietracking) - Simple API for tracking movies with favorite actors for the specific time.
Expand Down
13 changes: 13 additions & 0 deletions RELEASE_NOTES.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,17 @@
# Release Notes

## 4.0.0
* refactored drawRectangles method due to SRP.
* optimized isDifferentPixels to improve algorithm.
* moved to Apache License 2.0
* removed Point and used java.awt.Point instead
* added Gradle.yml for GitHub actions
* removed commandLine usage
* renamed ComparisonResult to ImageComparisonResult
* renamed ComparisonState to ImageComparisonState
* added own RuntimeException for wrapping checked exception
* added Gitter chat for communication.

## 3.3.1
* Fixed bug #134: If image is different in a line in 1 px, ComparisonState is always MATCH
* Fixed bug #136: deepCopy method throws IllegalArgumentException on shared BufferedImage
Expand Down
4 changes: 2 additions & 2 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@ plugins {
}

group 'com.github.romankh3'
version '4.0-beta'
version '4.0.0'
description 'A library and utility to compare different images.'
sourceCompatibility = 1.8

mainClassName = "com.github.romankh3.image.comparison.Main"
mainClassName = "com.github.romankh3.image.comparison.ImageComparison"

repositories {
mavenCentral()
Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

<groupId>com.github.romankh3</groupId>
<artifactId>image-comparison</artifactId>
<version>4.0-beta</version>
<version>4.0.0</version>
<packaging>jar</packaging>

<name>Image Comparison</name>
Expand Down

0 comments on commit c6989f5

Please sign in to comment.