Last active
May 28, 2019 09:06
-
-
Save grisu48/e087bd1096c38b5560a5c4ec54578dc0 to your computer and use it in GitHub Desktop.
Bash function to trim pictures using imagemagick
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Bash function to trim pictures using imagemagick | |
# This snippet is meant to be inserted as function in ~/.bashrc | |
ctrim() { | |
if [ $# -lt 1 ]; then | |
echo "ctrim - trim the given pictures (using convert --trim)" | |
else | |
# TODO: Parallel runs | |
for i in $@; do | |
convert -trim "$i" "$i" | |
done | |
fi | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment