aboutsummaryrefslogtreecommitdiff
path: root/create-demo.sh
diff options
context:
space:
mode:
authorDavid Phillips <david@sighup.nz>2017-02-27 14:59:19 +1300
committerDavid Phillips <david@sighup.nz>2017-02-27 14:59:19 +1300
commit1704088618e55ceeaf087f18f16d0070d8617dd0 (patch)
tree2877142ac8257b95da74c35989238f2bf842cddc /create-demo.sh
parent20a2a1b8523e6b5599ea95321d70ec7c7fd287d2 (diff)
downloadfractal-gen-opencl-1704088618e55ceeaf087f18f16d0070d8617dd0.tar.xz
Add new demo image with high detail
Diffstat (limited to 'create-demo.sh')
-rwxr-xr-xcreate-demo.sh20
1 files changed, 10 insertions, 10 deletions
diff --git a/create-demo.sh b/create-demo.sh
index 8cf9055..a341eb4 100755
--- a/create-demo.sh
+++ b/create-demo.sh
@@ -1,22 +1,22 @@
#!/bin/sh
-final_name="demo.png"
temp_name="demo.tmp.pgm"
clean() {
rm -v "$temp_name"
}
+create_demo() {
+ echo "::: Invoking fractal-gen through pnminvert for negative PGM image"
+ ./fractal-gen -p any -s "$1" -i "$2"| pnminvert > "$temp_name"
+ echo "::: Invoking ImageMagick to convert to PNG"
+ convert "$temp_name" "$3"
+ echo "::: Success. Final image is $3"
+}
+
hash pnminvert || exit
hash convert || exit
trap clean exit
-echo "::: Invoking fractal-gen through pnminvert for negative PGM image"
-
-./fractal-gen -p any -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"
+create_demo 768 75 demo-low-iterat.png
+create_demo 768 10000000 demo-high-iterat.png