Skip to content

Commit

Permalink
Tweak tempfile unlinking.
Browse files Browse the repository at this point in the history
  • Loading branch information
revarbat committed Apr 13, 2021
1 parent 5145a9f commit 3ffdf84
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
7 changes: 4 additions & 3 deletions openscad_runner/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -259,19 +259,20 @@ def run(self):
if self.antialias != 1.0:
img.thumbnail(self.imgsize, Image.ANTIALIAS)
imgs.append(img)
for imgfile in imgfiles:
os.unlink(imgfile)
imgs[0].save(
self.outfile,
save_all=True,
append_images=imgs[1:],
duration=self.animate_duration,
loop=0
)
for imgfile in imgfiles:
os.unlink(imgfile)
pygifsicle.optimize(self.outfile, colors=64)
elif self.antialias != 1.0:
elif float(self.antialias) != 1.0:
im = Image.open(self.outfile)
im.thumbnail(self.imgsize, Image.ANTIALIAS)
os.unlink(self.outfile)
im.save(self.outfile)
self.complete = True
return self.success
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

from setuptools import setup

VERSION = "1.0.8"
VERSION = "1.0.9"


with open('README.rst') as f:
Expand Down

0 comments on commit 3ffdf84

Please sign in to comment.