Created
December 10, 2010 13:34
-
-
Save ggarnier/736201 to your computer and use it in GitHub Desktop.
Batch conversion from tga to jpg
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 | |
# Batch conversion from tga to jpg | |
# Author: Guilherme Garnier - http://blog.guilhermegarnier.com | |
# Adapted from: | |
# http://linux.strangegamer.com/index.php?title=Converting_A_directory_of_TGA%27s_To_JPG | |
# http://www.cyberciti.biz/tips/handling-filenames-with-spaces-in-bash.html | |
SAVEIFS=$IFS | |
IFS=$(echo -en "\n\b") | |
for img in `ls *.tga` | |
do | |
convert $img ${img/.tga/.jpg} | |
done | |
IFS=$SAVEIFS |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment