push the readme
This commit is contained in:
parent
dd78487b84
commit
a9a4d3a631
1 changed files with 44 additions and 0 deletions
44
README.md
Normal file
44
README.md
Normal file
|
|
@ -0,0 +1,44 @@
|
|||
# Lilo Stitcher API
|
||||
|
||||
An ASP.NET Core Web API for stitching, cropping, and scaling tiled images (720×720).
|
||||
|
||||
## Prerequisites
|
||||
|
||||
* .NET 9.0 SDK
|
||||
* `ASSET_PATH_RO` environment variable containing the path to tiles directory (1,705 PNGs named A1.png…AE55.png)
|
||||
|
||||
## Build & Run
|
||||
|
||||
```bash
|
||||
cd lilo-stitcher
|
||||
dotnet clean
|
||||
dotnet run
|
||||
```
|
||||
|
||||
By default, the API listens on `http://localhost:5243` and `https://localhost:7121` (see [`launchSettings.json`](https://null.formulatrix.dev/fikribahru/lilo-stitcher/src/branch/main/Properties/launchSettings.json)).
|
||||
|
||||
## Usage
|
||||
|
||||
**Endpoint:** `POST /api/image/generate`
|
||||
|
||||
**Request Body (JSON):**
|
||||
|
||||
```json
|
||||
{
|
||||
"canvas_rect": "A1:H12",
|
||||
"crop_offset": [0.25, 0.25],
|
||||
"crop_size": [0.5, 0.5],
|
||||
"output_scale": 1.0
|
||||
}
|
||||
```
|
||||
|
||||
**Example (using `curl`):**
|
||||
|
||||
```bash
|
||||
curl -X POST http://localhost:5243/api/image/generate \
|
||||
-H "Content-Type: application/json" \
|
||||
-o output.png \
|
||||
-d '{"canvas_rect":"A1:H12","crop_offset":[0.25,0.25],"crop_size":[0.5,0.5],"output_scale":1.0}'
|
||||
```
|
||||
|
||||
The API will return a `image/png` containing the stitched, cropped, and scaled result.
|
||||
Loading…
Add table
Add a link
Reference in a new issue