@@ -98,7 +98,7 @@ public T withThumbnail(Path path, String name, double scale) {
98
98
* @return instance of type Snapshot
99
99
*/
100
100
public T withThumbnail (double scale ) {
101
- return withThumbnail (Paths .get (location .toString (),"./thumbnails" ).toString (),"thumb_" + fileName ,scale );
101
+ return withThumbnail (Paths .get (location .toString (), "./thumbnails" ).toString (), "thumb_" + fileName , scale );
102
102
}
103
103
104
104
/**
@@ -200,7 +200,7 @@ public boolean equals(BufferedImage image, double deviation) {
200
200
*/
201
201
public boolean equalsWithDiff (BufferedImage image , String resultingImagePath ) {
202
202
if (this .getImage () == image ) return true ;
203
- return getImage () != null ? ImageProcessor .imagesAreEqualsWithDiff (getImage (), image ,resultingImagePath , 0 ) : image == null ;
203
+ return getImage () != null ? ImageProcessor .imagesAreEqualsWithDiff (getImage (), image , resultingImagePath , 0 ) : image == null ;
204
204
}
205
205
206
206
/**
@@ -211,7 +211,28 @@ public boolean equalsWithDiff(BufferedImage image, String resultingImagePath) {
211
211
*/
212
212
public boolean equalsWithDiff (BufferedImage image , String resultingImagePath , double deviation ) {
213
213
if (this .getImage () == image ) return true ;
214
- return getImage () != null ? ImageProcessor .imagesAreEqualsWithDiff (getImage (), image ,resultingImagePath , deviation ) : image == null ;
214
+ return getImage () != null ? ImageProcessor .imagesAreEqualsWithDiff (getImage (), image , resultingImagePath , deviation ) : image == null ;
215
+ }
216
+
217
+ /**
218
+ * @param image Snapshot to compare with.
219
+ * @param resultingImagePath path to save to resulting images with diff
220
+ * @return true if the the provided image and current image are strictly equal.
221
+ */
222
+ public boolean equalsWithDiff (Snapshot image , String resultingImagePath ) {
223
+ if (this == image ) return true ;
224
+ return getImage () != null ? ImageProcessor .imagesAreEqualsWithDiff (getImage (), image .getImage (),resultingImagePath , 0 ) : image == null ;
225
+ }
226
+
227
+ /**
228
+ * @param image Snapshot to compare with.
229
+ * @param resultingImagePath path to save to resulting images with diff
230
+ * @param deviation allowed deviation while comparing
231
+ * @return true if the the provided image and current image are strictly equal.
232
+ */
233
+ public boolean equalsWithDiff (Snapshot image , String resultingImagePath , double deviation ) {
234
+ if (this == image ) return true ;
235
+ return getImage () != null ? ImageProcessor .imagesAreEqualsWithDiff (getImage (), image .getImage (),resultingImagePath , deviation ) : image == null ;
215
236
}
216
237
217
238
/**
0 commit comments