Skip to content
Snippets Groups Projects
Commit b7b8b4d4 authored by David Rouquet's avatar David Rouquet
Browse files

ajout des gif et fuzzyness au trim

parent 473b07c7
Branches
No related tags found
No related merge requests found
...@@ -19,9 +19,9 @@ fi ...@@ -19,9 +19,9 @@ fi
find "$DIRECTORY" -type f | while read -r filepath; do find "$DIRECTORY" -type f | while read -r filepath; do
# Check if the file is an image # Check if the file is an image
file_type=$(file --mime-type -b "$filepath") file_type=$(file --mime-type -b "$filepath")
if [[ $file_type == image/* ]]; then if [[ $file_type == image/* ]] || [[ "$filepath" == *.gif ]]; then
# Apply the magick convert command with -trim option # Apply the magick convert command with -trim and -fuzz options
magick convert "$filepath" -trim "$filepath" magick convert "$filepath" -fuzz 10% -trim +repage "$filepath"
echo "Processed: $filepath" echo "Processed: $filepath"
else else
echo "Skipped (not an image): $filepath" echo "Skipped (not an image): $filepath"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment