aboutsummaryrefslogtreecommitdiff
path: root/create-demo.sh
blob: 80a22bd5ee68961b8f3210927c13600d92cfe474 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#!/bin/sh

final_name="demo.png"
temp_name="demo.tmp.pgm"

clean() {
	rm -v "$temp_name"
}

hash pnminvert || exit
hash convert || exit
trap clean exit

echo "::: Invoking fractal-gen through pnminvert for negative PGM image"

./fractal-gen -s 768 -i 75 | pnminvert > "$temp_name"

echo "::: Invoking ImageMagick to convert to PNG"

convert "$temp_name" "$final_name"

echo "::: Success. Final image is $final_name"