diff --git a/openscad_runner/__init__.py b/openscad_runner/__init__.py index da779b3..8e2700b 100755 --- a/openscad_runner/__init__.py +++ b/openscad_runner/__init__.py @@ -8,6 +8,7 @@ from enum import Enum from PIL import Image, ImageChops +import pygifsicle class RenderMode(Enum): @@ -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) diff --git a/setup.py b/setup.py index cde70f4..bab4faa 100644 --- a/setup.py +++ b/setup.py @@ -2,7 +2,7 @@ from setuptools import setup -VERSION = "1.0.0" +VERSION = "1.0.2" with open('README.rst') as f: @@ -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=[ @@ -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, )