From 1f17e40c07910ced44ce0c45391d398585ded8ad Mon Sep 17 00:00:00 2001 From: tc-wleite Date: Sat, 19 Oct 2024 17:36:07 -0300 Subject: [PATCH] '#2346: Do not calculate image similarity features, if already present. --- .../iped/engine/task/similarity/ImageSimilarityTask.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/iped-engine/src/main/java/iped/engine/task/similarity/ImageSimilarityTask.java b/iped-engine/src/main/java/iped/engine/task/similarity/ImageSimilarityTask.java index 42a610700a..6edb7f700f 100644 --- a/iped-engine/src/main/java/iped/engine/task/similarity/ImageSimilarityTask.java +++ b/iped-engine/src/main/java/iped/engine/task/similarity/ImageSimilarityTask.java @@ -95,6 +95,11 @@ protected void process(IItem evidence) throws Exception { return; } + Object prev = evidence.getExtraAttribute(IMAGE_FEATURES); + if (prev != null && prev instanceof byte[]) { + return; + } + try { byte[] thumb = evidence.getThumb(); if (thumb == null) {