semvec/pypi-packages huggingface dataset:
tyled 0.1.dev5
CLI utility for generating Tiled Tilesets
Requires Python: >=3.6

# Tyled :butterfly:

CLI utility for generating [Tiled](https://www.mapeditor.org/) Tilesets

:notebook: [Documentation](https://tyled.readthedocs.io/en/latest/)

:package: [Package](https://pypi.org/project/tyled/)

## Installation

### From PyPI

#### TLDR - do this at your own risk

        pip install tyled

#### Recommended - pipX

If you don't already have it installed go to https://pypi.org/project/pipx/ for instructions

        pipx install tyled


### From GitHub

Clone the repository

        git clone https://github.com/kfields/tyled.git

Navigate to the new directory which contains the repository

        cd tyled

Create a Python 3 virtual environment called `env`

        python3 -m venv env

Activate the environment

        source env/bin/activate

Install required packages

        pip install -r requirements.txt

## Commands

### Bake

        tyled bake mytileset.toml [--save/--no-save][--show/--no-show][--rotation/--no-rotation]

#### Options

Default options are --save, --no-show, --no-rotation

## Projects

Tyled Projects are defined using TOML files.

All Projects must at least have a name and type

```toml
name = 'mytileset'
type = 'collection'
```

### Options

Options may be defined within the project file.  Any options defined here will override the command line options

```toml
[options]
rotation = true
```

## Tilesets

Tyled currently supports three different kinds of Tilesets:

### Collection Tileset

A Collection Tileset is composed of tiles with images stored in separate files

```toml
name = 'mytileset'
type = 'collection'

firstgid = 1
source = 'sticker-knight/map'
```

This example will generate mytileset.tsx in the current working directory

### Orthogonal Tileset

An Orthogonal Tileset is composed of tiles that have the same dimensions in one image file

```toml
name = 'mytileset'
type = 'orthogonal'

firstgid = 1
source = 'platformer/tiles'
tilewidth = 128
tileheight = 128
spacing = 0
margin = 0
columns = 12
```

This example will generate mytileset.tsx and mytileset.png in the current working directory

### Atlas Tileset

An Atlas Tileset is composed of tiles that do not have the same dimensions in one image file

```toml
name = 'mytileset'
type = 'atlas'

firstgid = 0
source = 'sticker-knight/map'
width = 1024
height = 1024
spacing = 0
margin = 0
```

This example will generate mytileset.tsx and mytileset.png in the current working directory
qcrop 0.0.1
A basic PyQt image cropping tool

# QCrop

A basic PyQt image cropping tool.

## Install

```
pip install qcrop
```

## Usage

### As an application
Start with the command:
```
qcrop path/to/image.ext
```

The supported image formats are [those handled by the Qt framework][formats]: BMP, GIF, JPG, PNG, PBM, PGM, PPM, XBM and XPM.

### As a python module
Sample code:

```python
from PyQt5.QtGui import QPixmap
from qcrop.ui import QCrop

original_image = QPixmap(...)
crop_tool = QCrop(original_image)
status = crop_tool.exec()

if status == Qt.Accepted:
    cropped_image = crop_tool.image
# else crop_tool.image == original_image
```

### User interface
Use the mouse to select the image area to crop. You can also use the X, Y, Width and Height fields to precisely adjust the area (you can use mouse wheel hovering the field).

Click the reset button to set the crop area to the full image.

Once done click ok to validate the crop, cancel to go back to the original image.

![screenshot](screenshot.png)


   [formats]: https://doc.qt.io/qt-5/qpixmap.html#reading-and-writing-image-files