Skip to content

Commit

Permalink
Merge pull request #20 from KilianB/BumpUtilityCodeVersion
Browse files Browse the repository at this point in the history
Minor version bump resolving #19. Support all types of exotic buffered image types
  • Loading branch information
KilianB authored Dec 25, 2018
2 parents 9d7930b 1722e53 commit 05174a7
Show file tree
Hide file tree
Showing 5 changed files with 25 additions and 6 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG
Original file line number Diff line number Diff line change
@@ -1,6 1,11 @@
- Semantic versioning


## [2.1.1] 25.12.2018

### Updated
- Bump Utility code version to 1.5.3 to support custom and exotic image color models.

## [2.1.0] 3.12.2018

### Changed
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 28,7 @@ The project is hosted on bintray and jcenter. <b>Please be aware that hashes cre
<dependency>
<groupId>com.github.kilianB</groupId>
<artifactId>JImageHash</artifactId>
<version>2.1.0</version>
<version>2.1.1</version>
</dependency>
````

Expand Down
4 changes: 2 additions & 2 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 7,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>com.github.kilianB</groupId>
<artifactId>JImageHash</artifactId>
<version>2.1.0</version>
<version>2.1.1</version>

<properties>
<bintrayRepository>maven</bintrayRepository>
Expand Down Expand Up @@ -48,7 48,7 @@
<dependency>
<groupId>com.github.kilianB</groupId>
<artifactId>UtilityCode</artifactId>
<version>1.5.1</version>
<version>1.5.3</version>
</dependency>

<dependency>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 26,8 @@ class SingleImageMatcherTest {
private static BufferedImage highQuality;
private static BufferedImage lowQuality;
private static BufferedImage thumbnail;
// Custom type image
private static BufferedImage catCustom;

@BeforeAll
static void loadImages() {
Expand All @@ -39,12 41,12 @@ static void loadImages() {
.read(SingleImageMatcherTest.class.getClassLoader().getResourceAsStream("lowQuality.jpg"));
thumbnail = ImageIO
.read(SingleImageMatcherTest.class.getClassLoader().getResourceAsStream("thumbnail.jpg"));

catCustom = ImageIO
.read(SingleImageMatcherTest.class.getClassLoader().getResourceAsStream("catCustom.png"));
} catch (IOException e) {
e.printStackTrace();
}
}

}
@Nested
class CheckDefaultMatcher {
@Test
Expand All @@ -64,6 66,8 @@ void imageMatches() {
assertTrue(matcher.checkSimilarity(lowQuality, lowQuality));
}, () -> {
assertTrue(matcher.checkSimilarity(thumbnail, thumbnail));
}, () -> {
assertTrue(matcher.checkSimilarity(catCustom, catCustom));
});

// Similar images
Expand All @@ -90,6 94,16 @@ void imageMatches() {
assertFalse(matcher.checkSimilarity(copyright, ballon));
}, () -> {
assertFalse(matcher.checkSimilarity(thumbnail, ballon));
}, () -> {
assertFalse(matcher.checkSimilarity(highQuality, ballon));
}, () -> {
assertFalse(matcher.checkSimilarity(lowQuality, catCustom));
}, () -> {
assertFalse(matcher.checkSimilarity(copyright, catCustom));
}, () -> {
assertFalse(matcher.checkSimilarity(thumbnail, catCustom));
}, () -> {
assertFalse(matcher.checkSimilarity(ballon, catCustom));
});

}
Expand Down
Binary file added src/test/resources/catCustom.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 05174a7

Please sign in to comment.