tadd gif option to render command - Granular.jl - Julia package for granular dynamics simulation
(HTM) git clone git://src.adamsgaard.dk/Granular.jl
(DIR) Log
(DIR) Files
(DIR) Refs
(DIR) README
(DIR) LICENSE
---
(DIR) commit 284dbb12779afde341987a96c35c8cf4b0bee2bc
(DIR) parent 45f3f14973f267dc21f19b4fd84bb7d36f1fc528
(HTM) Author: Anders Damsgaard <andersd@riseup.net>
Date: Wed, 15 Nov 2017 21:15:49 -0500
add gif option to render command
Diffstat:
M src/io.jl | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
---
(DIR) diff --git a/src/io.jl b/src/io.jl
t@@ -921,13 +921,16 @@ from the shell using the supplied `pvpython` argument.
* `pvpython::String`: path to the `pvpython` executable to use. By default, the
script uses the pvpython in the system PATH.
* `images::Bool`: render images to disk (default: true)
-* `animation::Bool`: render animation to disk (default: false)
+* `gif::Bool`: merge images as GIF and save to disk (default: false, requires
+ `images=true`)
+* `animation::Bool`: render animation as AVI to disk (default: false)
* `trim::Bool`: trim images in animated sequence (default: true)
* `reverse::Bool`: if `images=true` additionally render reverse-animated gif
(default: false)
"""
function render(simulation::Simulation; pvpython::String="pvpython",
images::Bool=true,
+ gif::Bool=false,
animation::Bool=false,
trim::Bool=true,
reverse::Bool=false)
t@@ -938,7 +941,7 @@ function render(simulation::Simulation; pvpython::String="pvpython",
run(`$(pvpython) $(simulation.id)/$(simulation.id).py`)
# if available, use imagemagick to create gif from images
- if images
+ if images && gif
try
trim_string = ""
if trim