Created
June 6, 2012 04:07
-
-
Save KhasMek/2879860 to your computer and use it in GitHub Desktop.
simple script to find and colorize file in a folder(s)
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 | |
# | |
# A simple colorizer script for ImageMagick to batch modify | |
# resource images. | |
# -KhasMek | |
file=${1} | |
location=${2} | |
if [ ! "$location" ]; then | |
location=. | |
fi | |
if [ ! "$file" ]; then | |
file=*.png | |
fi | |
find $location -name $file | while read line | |
do | |
# I don't think this will actually be necessary. | |
#if [ find $line -name *.9.png ! = "" ]; then | |
# echo "$line is a 9 png, cropping" | |
# convert $line -crop 1x1+1+1 +repage $line | |
#fi | |
echo "colorizing $line" | |
# Brightness, Saturation, Hue. | |
convert $line -modulate 100,140,170 $line | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment