diff --git a/CHANGELOG b/CHANGELOG index a217e26..681c711 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -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 diff --git a/README.md b/README.md index 5ba4c3d..58b97cd 100644 --- a/README.md +++ b/README.md @@ -28,7 +28,7 @@ The project is hosted on bintray and jcenter. Please be aware that hashes cre com.github.kilianB JImageHash - 2.1.0 + 2.1.1 ```` diff --git a/pom.xml b/pom.xml index bdaa695..167798c 100644 --- a/pom.xml +++ b/pom.xml @@ -7,7 +7,7 @@ 4.0.0 com.github.kilianB JImageHash - 2.1.0 + 2.1.1 maven @@ -48,7 +48,7 @@ com.github.kilianB UtilityCode - 1.5.1 + 1.5.3 diff --git a/src/test/java/com/github/kilianB/matcher/SingleImageMatcherTest.java b/src/test/java/com/github/kilianB/matcher/SingleImageMatcherTest.java index 29a5bf3..27e9fdf 100644 --- a/src/test/java/com/github/kilianB/matcher/SingleImageMatcherTest.java +++ b/src/test/java/com/github/kilianB/matcher/SingleImageMatcherTest.java @@ -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() { @@ -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 @@ -64,6 +66,8 @@ void imageMatches() { assertTrue(matcher.checkSimilarity(lowQuality, lowQuality)); }, () -> { assertTrue(matcher.checkSimilarity(thumbnail, thumbnail)); + }, () -> { + assertTrue(matcher.checkSimilarity(catCustom, catCustom)); }); // Similar images @@ -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)); }); } diff --git a/src/test/resources/catCustom.png b/src/test/resources/catCustom.png new file mode 100644 index 0000000..a469b3f Binary files /dev/null and b/src/test/resources/catCustom.png differ