Created
February 9, 2018 00:03
-
-
Save rriemann/bf39c675e69c552ffc6b4b844df02627 to your computer and use it in GitHub Desktop.
convert pictures in for loop
This file contains hidden or 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
#!/usr/bin/env bash | |
find . -print0 | while read -d $'\0' file | |
do | |
convert -size 800x800 ${file} -resize 800x800 +profile '*' ${file%\.*}_big.jpg | |
convert -size 200x150 ${file} -resize 200x150 +profile '*' ${file%\.*}_small.jpg | |
echo "<a class=\"zoom\" rel=\"group02\" title=\"${file}\" href=\"{relocatable: /referenzen/${file%\.*}_big.jpg}\"><img src=\"{relocatable: /referenzen/${file%\.*}_small.jpg}\" alt=\"\" /></a>" | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment