@@ -28,7 +28,9 @@ public class ImageHashService {
|
|||||||
public Map<String, Long> calculateHash(Path imagePath) throws IOException {
|
public Map<String, Long> calculateHash(Path imagePath) throws IOException {
|
||||||
// File file = cloudStorageService.readFileFromStorageByPath(imagePath.toString());
|
// File file = cloudStorageService.readFileFromStorageByPath(imagePath.toString());
|
||||||
File file = imagePath.toFile();
|
File file = imagePath.toFile();
|
||||||
|
if (file == null) {
|
||||||
|
file = cloudStorageService.readFileFromStorageByPath(imagePath.toString());
|
||||||
|
}
|
||||||
|
|
||||||
PHash pHash = PerceptualHashHelper.INSTANCE.generateDCTPerceptualHash(file);
|
PHash pHash = PerceptualHashHelper.INSTANCE.generateDCTPerceptualHash(file);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user