summaryrefslogtreecommitdiff
path: root/collect-images.sh
blob: f5e1e2be13995328a969b1847fa22fc621d89949 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
#!/bin/bash

while read location path filename command ;
do
	if [ "$location" == "remote" ]; then
		wget -nc $path -O images/$filename
	elif [ "$location" == "convert" ]; then
		#needs librsvg2-bin for svg conversions
		$command $HOME/$path images/$filename
	else
		cp -n $HOME/$path images/$filename
	fi
done < image-sources.txt

#Manual image conversions
inkscape -z $HOME/images/research/clearcut_diagram.svg -e=images/clearcut_diagram.png --export-dpi=300
inkscape -z $HOME/images/research/patchcut_diagram.svg -e=images/patchcut_diagram.png --export-dpi=300
inkscape -z $HOME/images/research/shelterwood_diagram.svg -e=images/shelterwood_diagram.png --export-dpi=300
inkscape -z $HOME/images/research/singletree_diagram.svg -e=images/singletree_diagram.png --export-dpi=300
inkscape -z $HOME/images/research/dispersal_methods.svg --export-eps images/dispersal_methods.eps
inkscape -z $HOME/images/research/soel_diagram.svg -e=images/soel_diagram.png --export-dpi=300

if ! [ -f images/rubus.png ]; then
	convert images/rubus.jpg images/rubus.png
fi
if ! [ -f images/scarlet_tanager.png ]; then
	convert images/scarlet_tanager.jpg images/scarlet_tanager.png
fi

#needs gifsicle package
if ! [ -d images/soel ]; then
	echo "Building SOEL animation..."
	mkdir images/soel
	gifsicle --unoptimize $HOME/images/research/animation_contextualforest.gif | convert - images/soel/frame-%d.png
fi