Skip to content

Commit

Permalink
Added gifsicle optimization.
Browse files Browse the repository at this point in the history
  • Loading branch information
Garth Minette committed Feb 8, 2021
1 parent a3b7456 commit 31f7fdc
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
2 changes: 2 additions & 0 deletions openscad_runner/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@

from enum import Enum
from PIL import Image, ImageChops
import pygifsicle


class RenderMode(Enum):
Expand Down Expand Up @@ -259,6 +260,7 @@ def run(self):
)
for imgfile in imgfiles:
os.unlink(imgfile)
pygifsicle.optimize(self.outfile)
elif self.antialias != 1.0:
im = Image.open(self.outfile)
im.thumbnail(self.imgsize, Image.ANTIALIAS)
Expand Down
7 changes: 4 additions & 3 deletions 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.0"
VERSION = "1.0.2"


with open('README.rst') as f:
Expand All @@ -19,7 +19,7 @@
author='Revar Desmera',
author_email='revarbat@gmail.com',
url='https://github.com/revarbat/openscad_runner',
download_url='https://github.com/revarbat/openscad_runner/archive/master.zip',
download_url='https://github.com/revarbat/openscad_runner/archive/v1.0.2.zip',
packages=['openscad_runner'],
license='MIT License',
classifiers=[
Expand All @@ -41,7 +41,8 @@
keywords='openscad interface',
install_requires=[
'setuptools',
'Pillow>=7.2.0'
'Pillow>=7.2.0',
'pygifsicle>=1.0.2'
],
data_files=data_files,
)
Expand Down

0 comments on commit 31f7fdc

Please sign in to comment.