From b7b8b4d46b2b890487132057a15f0b68e8875833 Mon Sep 17 00:00:00 2001 From: daxid <david.rouquet@tetras-libre.fr> Date: Thu, 12 Jun 2025 14:50:06 +0200 Subject: [PATCH] ajout des gif et fuzzyness au trim --- tetras_extraction/script/cropImages.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tetras_extraction/script/cropImages.sh b/tetras_extraction/script/cropImages.sh index a35e009..409fe0d 100644 --- a/tetras_extraction/script/cropImages.sh +++ b/tetras_extraction/script/cropImages.sh @@ -19,9 +19,9 @@ fi find "$DIRECTORY" -type f | while read -r filepath; do # Check if the file is an image file_type=$(file --mime-type -b "$filepath") - if [[ $file_type == image/* ]]; then - # Apply the magick convert command with -trim option - magick convert "$filepath" -trim "$filepath" + if [[ $file_type == image/* ]] || [[ "$filepath" == *.gif ]]; then + # Apply the magick convert command with -trim and -fuzz options + magick convert "$filepath" -fuzz 10% -trim +repage "$filepath" echo "Processed: $filepath" else echo "Skipped (not an image): $filepath" -- GitLab