mirror of
https://codeberg.org/vlw/pysheeter.git
synced 2025-09-13 19:23:41 +02:00
Merge pull request #2 from VictorWesterlund/VictorWesterlund-readme-package
Update README.md with new package-based installation
This commit is contained in:
commit
d3a2f679cc
1 changed files with 7 additions and 7 deletions
14
README.md
14
README.md
|
@ -1,20 +1,20 @@
|
|||
# PySheeter
|
||||
Lightweight Pillow Python-script to create and scale sprite sheets from PNGs in folders or individually
|
||||
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
|
||||
2. Download and install [Pillow](https://pypi.org/project/Pillow/) for Python 3 with `pip3`
|
||||
2. Install the latest build of PySheeter with [`pip3`](https://pypi.org/project/pysheeter/)
|
||||
```bash
|
||||
$ pip3 install Pillow
|
||||
$ python3 -m pip install pysheeter
|
||||
```
|
||||
### Sprite sheet from folder
|
||||
1. Import `Sheet` from `pysheeter`
|
||||
```python
|
||||
from pysheeter import Sheet
|
||||
from pysheeter import PySheeter
|
||||
```
|
||||
2. Initialize the class with a path to your PNG-folder
|
||||
```python
|
||||
spritesheet = pysheeter.Sheet("example/")
|
||||
spritesheet = PySheeter.Sheet("example/")
|
||||
```
|
||||
3. Create a sprite sheet with `put()`
|
||||
```python
|
||||
|
@ -41,11 +41,11 @@ spritesheet.put("example_h1632.png",(16,32),False)
|
|||
### Sprite sheet from individual PNG-images
|
||||
1. Import `Sheet` from `pysheeter`
|
||||
```python
|
||||
from pysheeter import Sheet
|
||||
from pysheeter import PySheeter
|
||||
```
|
||||
2. Initialize the class without any arguments
|
||||
```python
|
||||
spritesheet = pysheeter.Sheet()
|
||||
spritesheet = PySheeter.Sheet()
|
||||
```
|
||||
3. Add PNG-images with `add()`
|
||||
```python
|
||||
|
|
Loading…
Add table
Reference in a new issue