Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
B
biseau
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
8
Issues
8
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
Operations
Operations
Incidents
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
BOURNEUF Lucas
biseau
Commits
67bf8eb1
Commit
67bf8eb1
authored
Nov 04, 2018
by
Lucas Bourneuf
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bugfix: gif not generated properly ; loop argument
parent
aa8c2ec1
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
biseau/core.py
biseau/core.py
+2
-2
No files found.
biseau/core.py
View file @
67bf8eb1
...
...
@@ -32,13 +32,13 @@ def single_image_from_filenames(fnames:[str], outfile:str=None, dotfile:str=None
return
compile_to_single_image
(
final_context
,
outfile
=
outfile
,
dotfile
=
dotfile
,
return_image
=
return_image
,
verbosity
=
verbosity
)
def
gif_from_filenames
(
fnames
:[
str
],
giffile
:
str
=
None
,
dotfile_template
:
str
=
None
,
duration
:
int
=
1000
,
verbosity
:
int
=
0
)
->
bytes
or
str
:
def
gif_from_filenames
(
fnames
:[
str
],
giffile
:
str
=
None
,
dotfile_template
:
str
=
None
,
duration
:
int
=
1000
,
loop
:
int
=
0
,
verbosity
:
int
=
0
)
->
bytes
or
str
:
"""Make a gif, with each ASP model as an image. Save it in outfile and dotfile_template"""
pipeline
=
build_pipeline
(
fnames
,
verbosity
)
final_context
=
run
(
pipeline
,
verbosity
=
verbosity
)
first
,
*
lasts
=
compile_to_images
(
final_context
,
dotfile_template
=
dotfile_template
,
return_image
=
True
,
verbosity
=
verbosity
)
output
=
io
.
BytesIO
()
if
giffile
is
None
else
giffile
first
.
save
(
output
,
save_all
=
True
,
append_images
=
lasts
,
duration
=
duration
,
loop
=
0
)
first
.
save
(
output
,
format
=
'gif'
,
append_images
=
lasts
,
duration
=
duration
,
loop
=
loop
,
save_all
=
True
)
return
output
.
getvalue
()
if
giffile
is
None
else
giffile
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment