From ec055e0b0bda431a93764943247354f3b0a652f1 Mon Sep 17 00:00:00 2001 From: Chase <44284917+TotallyNotChase@users.noreply.github.com> Date: Wed, 26 Feb 2020 10:53:24 +0530 Subject: [PATCH] Update to 0.0.9.1 --- CHANGELOG.md | 2 ++ glitch_this/glitch_this.py | 8 ++++---- setup.py | 4 ++-- 3 files changed, 8 insertions(+), 6 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index f9181d2..d14e9e5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -58,3 +58,5 @@ Reduce compression level from 6 to 3 in `commandline.py` (improves performance significantly) `-f,--frames` has been renamed to `-fr, --frames` + +* 0.0.9.1 -> Reduce compression level from 6 to 3 `glitch_this.py` (improves performance) diff --git a/glitch_this/glitch_this.py b/glitch_this/glitch_this.py index 44d8ba8..9e8e735 100644 --- a/glitch_this/glitch_this.py +++ b/glitch_this/glitch_this.py @@ -6,7 +6,7 @@ class ImageGlitcher: # Handles Image/GIF Glitching Operations - __version__ = '0.0.9' + __version__ = '0.0.9.1' def __init__(self): # Setting up global variables needed for glitching @@ -153,7 +153,7 @@ def glitch_image(self, src_img, glitch_amount, color_offset=False, scan_lines=Fa """ glitched_img = self.__get_glitched_img(glitch_amount, color_offset, scan_lines) file_path = os.path.join(self.gif_dirpath, 'glitched_frame.png') - glitched_img.save(file_path) + glitched_img.save(file_path, compress_level=3) glitched_imgs.append(Image.open(file_path).copy()) # Cleanup @@ -209,10 +209,10 @@ def glitch_gif(self, src_gif, glitch_amount, color_offset=False, scan_lines=Fals """ duration += frame.info['duration'] file_path = os.path.join(self.gif_dirpath, 'frame.png') - frame.save(file_path) + frame.save(file_path, compress_level=3) glitched_img = self.glitch_image(file_path, glitch_amount, color_offset, scan_lines) file_path = os.path.join(self.gif_dirpath, 'glitched_{}.png'.format(str(i))) - glitched_img.save(file_path) + glitched_img.save(file_path, compress_level=3) glitched_imgs.append(Image.open(file_path).copy()) i += 1 # Cleanup diff --git a/setup.py b/setup.py index 2a21801..bdf18df 100644 --- a/setup.py +++ b/setup.py @@ -5,10 +5,10 @@ setup( name='glitch_this', - version='0.0.9', + version='0.0.9.1', author='TotallyNotChase', author_email='44284917+TotallyNotChase@users.noreply.github.com', - description='A package to glitch images', + description='A package to glitch images and GIFs, with highly customizable options!', long_description=readme, long_description_content_type='text/markdown', url='https://github.com/TotallyNotChase/Glitch-and-Gif',