@@ -164,13 +164,8 @@ public class ImageFoundRequestHandler implements RequestHandler {
|
|||||||
try {
|
try {
|
||||||
tempFile = convertToSupportedFormat(fileUploadService.downloadImageFromUrl(url));
|
tempFile = convertToSupportedFormat(fileUploadService.downloadImageFromUrl(url));
|
||||||
File file = tempFile.toFile();
|
File file = tempFile.toFile();
|
||||||
// String filePath = tempFile.toAbsolutePath().toString();
|
|
||||||
NoCopyCheckResult checkResult = noCopyFileService.checkFile(file, FileProtector.Type.IMAGE);
|
NoCopyCheckResult checkResult = noCopyFileService.checkFile(file, FileProtector.Type.IMAGE);
|
||||||
// Map<String, Long> hashSearchApiFile = imageHashService.calculateHash(Paths.get(filePath));
|
|
||||||
// ImageHashEntity checkFileHash = imageHashRepository.findByFileId(fileId);
|
|
||||||
|
|
||||||
// boolean hashesAreEqual = hashSearchApiFile.get("hi").equals(checkFileHash.getHash64Hi())
|
|
||||||
// && hashSearchApiFile.get("low").equals(checkFileHash.getHash64Lo());
|
|
||||||
if (checkResult instanceof ImageCheckResult.Success success) {
|
if (checkResult instanceof ImageCheckResult.Success success) {
|
||||||
double watermarkCorrelation = success.getWatermarkCorrelation();
|
double watermarkCorrelation = success.getWatermarkCorrelation();
|
||||||
log.info("watermarkCorrelation: " + watermarkCorrelation);
|
log.info("watermarkCorrelation: " + watermarkCorrelation);
|
||||||
|
|||||||
Reference in New Issue
Block a user