From a20932e85752cb0491fd022b030c8321f1aced7c Mon Sep 17 00:00:00 2001 From: Daniel Morell Date: Fri, 1 Nov 2019 18:46:04 -0500 Subject: [PATCH] Fixed #2 Subsampling default set to -1 for CLI --- README.md | 4 +++- cruncher/__init__.py | 8 ++++---- cruncher/core.py | 3 ++- 3 files changed, 9 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 094f76d..db824d8 100644 --- a/README.md +++ b/README.md @@ -2,11 +2,13 @@ Cruncher is a simple but powerful command line tool that optimizes images for the web. +[![Version](https://flat.badgen.net/badge/PyPI/v0.2.1)](https://pypi.org/project/cruncher/) + ## Installing Install and update Cruncher using [pip](https://pip.pypa.io/en/stable/quickstart/). -``` +```commandline $ pip install cruncher ``` diff --git a/cruncher/__init__.py b/cruncher/__init__.py index 8d41195..a844d67 100644 --- a/cruncher/__init__.py +++ b/cruncher/__init__.py @@ -110,9 +110,9 @@ def cli(image, directory, output, file_format, quality, size, append, """ cruncher = CrunchHandler(image=image, directory=directory, output=output, file_format=file_format, - quality=quality, size=size, append=append, metadata=metadata, - orientation=orientation, nversions=nversions, recursive=recursive, - config=config) + quality=quality, size=size, append=append, metadata=metadata, + orientation=orientation, nversions=nversions, recursive=recursive, + config=config) cruncher.run_cruncher() # Calculate Stats @@ -135,4 +135,4 @@ def cli(image, directory, output, file_format, quality, size, append, if __name__ == '__main__': cli() -__version__ = '0.2' +__version__ = '0.2.1' diff --git a/cruncher/core.py b/cruncher/core.py index f53f82b..3df7509 100644 --- a/cruncher/core.py +++ b/cruncher/core.py @@ -95,7 +95,8 @@ def generate_versions(self): 'quality': self.quality, 'append': self.append, 'orientation': self.orientation, - 'metadata': self.metadata + 'metadata': self.metadata, + 'subsampling': -1 }) def get_images(self):