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
|
@ -6,7 +6,7 @@
|
||||||
Lightweight Pillow Python package to create and scale sprite sheets from individual PNGs or whole folders
|
Lightweight Pillow Python package to create and scale sprite sheets from individual PNGs or whole folders
|
||||||
|
|
||||||
## Get started / Basic usage
|
## 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/)
|
2. Install the latest build of PySheeter with [`pip3`](https://pypi.org/project/pysheeter/)
|
||||||
```bash
|
```bash
|
||||||
$ python3 -m pip install pysheeter
|
$ python3 -m pip install pysheeter
|
||||||
|
@ -31,13 +31,13 @@ __Example usage:__
|
||||||
# from 'example.py'
|
# from 'example.py'
|
||||||
from pysheeter import PySheeter
|
from pysheeter import PySheeter
|
||||||
|
|
||||||
# Load sprites from 'example/'
|
# Load sprites from './files/' (all sprites are 64x64)
|
||||||
spritesheet = PySheeter.Sheet("example")
|
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))
|
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)
|
spritesheet.put("example_h1632.png",(16,32),False)
|
||||||
```
|
```
|
||||||

|

|
||||||
|
|
|
@ -1 +0,0 @@
|
||||||
from lib import PySheeter
|
|
10
example.py
|
@ -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
|
@ -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)
|
Before Width: | Height: | Size: 373 B After Width: | Height: | Size: 373 B |
Before Width: | Height: | Size: 406 B After Width: | Height: | Size: 406 B |
Before Width: | Height: | Size: 471 B After Width: | Height: | Size: 471 B |
Before Width: | Height: | Size: 291 B After Width: | Height: | Size: 291 B |
Before Width: | Height: | Size: 333 B After Width: | Height: | Size: 333 B |
Before Width: | Height: | Size: 333 B After Width: | Height: | Size: 333 B |
Before Width: | Height: | Size: 280 B After Width: | Height: | Size: 280 B |
Before Width: | Height: | Size: 333 B After Width: | Height: | Size: 333 B |
Before Width: | Height: | Size: 450 B After Width: | Height: | Size: 450 B |