Saturday, March 23, 2013

collage workflow

copy files

normalize directory names

normalize filenames (replace spaces, replace special chars " ' ", etc...)

list of files

get rid of corrupted files 

resize and eventually crop

for i in $(cat lists/lucaAlbums.jpgl | shuffle.pl); do mkdir -p tiles/`dirname ${i}` | sed 's@^\.@tiles@'; echo "[PROCESSING]: image ${i}";  convert -resize 400x400 -crop 150x150+0+0 -gravity center ${i} `echo ${i} | sed 's@^\.@tiles@'`; done

randomize and rename

put in the same repository 3,000 images collage

mkdir tmp; find -iname *.jpg -exec cp {} tmp/ \;

montage of 1/3 % of my 30,000 images 10,000 ima

montage *  -tile 20x20 -background black -geometry +5+5 miff:- | convert - -bordercolor black -border 5 ../montage.jpg

montage  -resize 150x150 -crop 150x150+0+0 -gravity center   -tile 8x8 -geometry +7+7  test.png

 paste -d " " <(for i in imgs/*.jpg; do cat `echo $i | sed -e 's@imgs@votes@' -e 's@jpg@vote@'` ; done)  <(for i in imgs/*.jpg; do echo ${i}; done) | head -n 60 | sort -g  |  tee | awk '{print $2}' | tr '\n' ' ' > tmp.txt;  montage `cat tmp.txt` -resize 150x150 -crop 150x150+0+0 -gravity center   -tile 8x8 -geometry +7+7  -page A4  test_good.pdf

write text on images 

convert 36054.jpg  -fill white  -undercolor '#00000080'  -gravity South  -pointsize 100   -annotate +0+5 '4.545' ~/anno_undercolor.jpg; display ~/anno_undercolor.jpg

convert 36054.jpg  -fill white  -undercolor '#00000080'  -gravity South  -pointsize 100   -annotate +0+5 '4.545' ~/anno_undercolor.jpg; display ~/anno_undercolor.jpg

for i in ../votes/*.vote; do echo -n "${i} " ;  convert `basename ${i} .vote`.jpg  -fill white  -undercolor '#00000080'  -gravity South  -pointsize 100   -annotate +0+5 `cat ${i}`  ~/`basename ${i} .vote`.jpg; done

No comments:

Post a Comment