1.0.6-cleanup

Moved example.py into "example/". Removed __init__.py from repo root now PySheeter should be installed as a Python module.

Wording in "example.py", also reflected in README
This commit is contained in:
Victor Westerlund 2020-11-26 16:34:38 +01:00
parent 23b13134d3
commit 9bcd1238c9
13 changed files with 14 additions and 15 deletions

View file

@ -6,7 +6,7 @@
Lightweight Pillow Python package to create and scale sprite sheets from individual PNGs or whole folders
## Get started / Basic usage
1. Download and install [Python 3](https://www.python.org/downloads/) for your architecture
1. Download and install the latest version of [Python 3](https://www.python.org/downloads/) for your architecture
2. Install the latest build of PySheeter with [`pip3`](https://pypi.org/project/pysheeter/)
```bash
$ python3 -m pip install pysheeter
@ -31,13 +31,13 @@ __Example usage:__
# from 'example.py'
from pysheeter import PySheeter
# Load sprites from 'example/'
# Load sprites from './files/' (all sprites are 64x64)
spritesheet = PySheeter.Sheet("example")
# Create a vertical spritesheet with the dimensions 16x16
# Create a vertical spritesheet with the dimensions 16x16 (scaled)
spritesheet.put("example_v1616.png",(16,16))
# Create a horizontal spritesheet with the dimensions 16x32
# Create a horizontal spritesheet with the dimensions 16x32 (scaled & stretched)
spritesheet.put("example_h1632.png",(16,32),False)
```
![Example 1](https://storage.googleapis.com/public.victorwesterlund.com/github/VictorWesterlund/pysheeter/1example_v1616.png)

View file

@ -1 +0,0 @@
from lib import PySheeter

View file

@ -1,10 +0,0 @@
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)

10
example/example.py Normal file
View file

@ -0,0 +1,10 @@
from pysheeter import PySheeter
# Load sprites from './files/' (all sprites are 64x64)
spritesheet = PySheeter.Sheet("files")
# Create a vertical spritesheet with the dimensions 16x16 (scaled)
spritesheet.put("example_v1616.png",(16,16))
# Create a horizontal spritesheet with the dimensions 16x32 (scaled & stretched)
spritesheet.put("example_h1632.png",(16,32),False)

View file

Before

Width:  |  Height:  |  Size: 373 B

After

Width:  |  Height:  |  Size: 373 B

View file

Before

Width:  |  Height:  |  Size: 406 B

After

Width:  |  Height:  |  Size: 406 B

View file

Before

Width:  |  Height:  |  Size: 471 B

After

Width:  |  Height:  |  Size: 471 B

View file

Before

Width:  |  Height:  |  Size: 291 B

After

Width:  |  Height:  |  Size: 291 B

View file

Before

Width:  |  Height:  |  Size: 333 B

After

Width:  |  Height:  |  Size: 333 B

View file

Before

Width:  |  Height:  |  Size: 333 B

After

Width:  |  Height:  |  Size: 333 B

View file

Before

Width:  |  Height:  |  Size: 280 B

After

Width:  |  Height:  |  Size: 280 B

View file

Before

Width:  |  Height:  |  Size: 333 B

After

Width:  |  Height:  |  Size: 333 B

View file

Before

Width:  |  Height:  |  Size: 450 B

After

Width:  |  Height:  |  Size: 450 B