diff --git a/dist/pysheeter-VicW-1.0.0.tar.gz b/dist/pysheeter-VicW-1.0.0.tar.gz new file mode 100644 index 0000000..80b72a3 Binary files /dev/null and b/dist/pysheeter-VicW-1.0.0.tar.gz differ diff --git a/dist/pysheeter_VicW-1.0.0-py3-none-any.whl b/dist/pysheeter_VicW-1.0.0-py3-none-any.whl new file mode 100644 index 0000000..f41eb4f Binary files /dev/null and b/dist/pysheeter_VicW-1.0.0-py3-none-any.whl differ diff --git a/pysheeter_VicW.egg-info/PKG-INFO b/pysheeter_VicW.egg-info/PKG-INFO new file mode 100644 index 0000000..6cb75fc --- /dev/null +++ b/pysheeter_VicW.egg-info/PKG-INFO @@ -0,0 +1,104 @@ +Metadata-Version: 2.1 +Name: pysheeter-VicW +Version: 1.0.0 +Summary: Lightweight Python-script to create sprite sheets from transparent PNGs with Pillow +Home-page: https://github.com/VictorWesterlund/pysheeter +Author: VicW +Author-email: victor.vesterlund@gmail.com +License: UNKNOWN +Description: # PySheeter + Lightweight Pillow Python-script to create and scale sprite sheets from PNGs in folders or individually + + ## Get started / Basic usage + 1. Download and install [Python 3](https://www.python.org/downloads/) for your architecture + 2. Download and install [Pillow](https://pypi.org/project/Pillow/) for Python 3 with `pip3` + ```bash + $ pip3 install Pillow + ``` + ### Sprite sheet from folder + 1. Import `Sheet` from `pysheeter` + ```python + from pysheeter import Sheet + ``` + 2. Initialize the class with a path to your PNG-folder + ```python + spritesheet = pysheeter.Sheet("example/") + ``` + 3. Create a sprite sheet with `put()` + ```python + spritesheet.put("example_v1616.png",(16,16)) + # Creates a vertical spritesheet named 'example_v1616.png' with the dimensions 16x16px (scaled automatically) + ``` + + __Example usage:__ + ```python + # from 'example.py' + from pysheeter import PySheeter + + # Load sprites from 'example/' + spritesheet = PySheeter.Sheet("example") + + # Create a vertical spritesheet with the dimensions 16x16 + spritesheet.put("example_v1616.png",(16,16)) + + # Create a horizontal spritesheet with the dimensions 16x32 + spritesheet.put("example_h1632.png",(16,32),False) + ``` + ![Example 1](https://storage.googleapis.com/public.victorwesterlund.com/github/VictorWesterlund/pysheeter/1example_v1616.png) + ![Example 2](https://storage.googleapis.com/public.victorwesterlund.com/github/VictorWesterlund/pysheeter/1example_h1632.png) + ### Sprite sheet from individual PNG-images + 1. Import `Sheet` from `pysheeter` + ```python + from pysheeter import Sheet + ``` + 2. Initialize the class without any arguments + ```python + spritesheet = pysheeter.Sheet() + ``` + 3. Add PNG-images with `add()` + ```python + spritesheet.add("example/1.png") + spritesheet.add("example/2.png") + spritesheet.add("example/3.png") + ... + ``` + 4. Remove PNG-images with `remove()` + ```python + spritesheet.remove("example/2.png") + ``` + 5. Create a sprite sheet with `put()` + ```python + spritesheet.put("example_v1616.png",(16,16)) + # Creates a vertical spritesheet named 'example_v1616.png' with the dimensions 16x16px (scaled automatically) + ``` + + __Example usage:__ + ```python + from pysheeter import PySheeter + + # Load sprites from 'example/' + spritesheet = PySheeter.Sheet() + + # Add PNG-images + spritesheet.add("example/1.png") + spritesheet.add("example/2.png") + spritesheet.add("example/3.png") + spritesheet.add("example/7.png") + spritesheet.add("example/5.png") + spritesheet.add("example/9.png") + + # Create a vertical spritesheet with the dimensions 16x16 + spritesheet.put("example_v1616.png",(16,16)) + + # Create a horizontal spritesheet with the dimensions 16x32 + spritesheet.put("example_h1632.png",(16,32),False) + ``` + ![Example 1](https://storage.googleapis.com/public.victorwesterlund.com/github/VictorWesterlund/pysheeter/2example_v1616.png) + ![Example 2](https://storage.googleapis.com/public.victorwesterlund.com/github/VictorWesterlund/pysheeter/2example_h1632.png) + +Platform: UNKNOWN +Classifier: Programming Language :: Python :: 3 +Classifier: License :: OSI Approved :: MIT License +Classifier: Operating System :: OS Independent +Requires-Python: >=3.6 +Description-Content-Type: text/markdown diff --git a/pysheeter_VicW.egg-info/SOURCES.txt b/pysheeter_VicW.egg-info/SOURCES.txt new file mode 100644 index 0000000..a361fee --- /dev/null +++ b/pysheeter_VicW.egg-info/SOURCES.txt @@ -0,0 +1,6 @@ +README.md +setup.py +pysheeter_VicW.egg-info/PKG-INFO +pysheeter_VicW.egg-info/SOURCES.txt +pysheeter_VicW.egg-info/dependency_links.txt +pysheeter_VicW.egg-info/top_level.txt \ No newline at end of file diff --git a/pysheeter_VicW.egg-info/dependency_links.txt b/pysheeter_VicW.egg-info/dependency_links.txt new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/pysheeter_VicW.egg-info/dependency_links.txt @@ -0,0 +1 @@ + diff --git a/pysheeter_VicW.egg-info/top_level.txt b/pysheeter_VicW.egg-info/top_level.txt new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/pysheeter_VicW.egg-info/top_level.txt @@ -0,0 +1 @@ + diff --git a/setup.py b/setup.py new file mode 100644 index 0000000..59b5a42 --- /dev/null +++ b/setup.py @@ -0,0 +1,25 @@ +import setuptools + +with open("README.md","r") as fh: + long_description = fh.read() + +setuptools.setup( + name="pysheeter-VicW", + version="1.0.0", + author="VicW", + author_email="victor.vesterlund@gmail.com", + description="Lightweight Python-script to create sprite sheets from transparent PNGs with Pillow", + long_description=long_description, + long_description_content_type="text/markdown", + url="https://github.com/VictorWesterlund/pysheeter", + packages=setuptools.find_packages(), + classifiers=[ + "Programming Language :: Python :: 3", + "License :: OSI Approved :: MIT License", + "Operating System :: OS Independent", + ], + install_requires=[ + "Pillow", + ], + python_requires='>=3.6', +) \ No newline at end of file