Skip to content

Commit

Permalink
Update to 0.0.9.1
Browse files Browse the repository at this point in the history
  • Loading branch information
TotallyNotChase committed Feb 26, 2020
1 parent d3947e2 commit ec055e0
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 6 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)
8 changes: 4 additions & 4 deletions glitch_this/glitch_this.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down

0 comments on commit ec055e0

Please sign in to comment.