2025-07-31 01:10:30 +07:00
|
|
|
# Oh-My-Stitcher
|
|
|
|
|
|
|
|
|
|
## How to build
|
|
|
|
|
|
|
|
|
|
1. Clone this repo (obviously)
|
|
|
|
|
2. Enter repo (solution) directory
|
|
|
|
|
3. `dotnet build`
|
|
|
|
|
|
|
|
|
|
## How to run
|
|
|
|
|
|
2025-07-31 01:59:13 +07:00
|
|
|
**0. This project uses ASP.Net AoT**, please don't forget to install `zlib1g-dev`.
|
2025-07-31 01:10:30 +07:00
|
|
|
|
2025-07-31 01:59:13 +07:00
|
|
|
**1. Publish it**
|
2025-07-31 01:10:30 +07:00
|
|
|
- Enter `src/Oh.My.Stitcher`
|
|
|
|
|
- `dotnet publish -c Release -r linux-arm64`
|
|
|
|
|
|
2025-07-31 01:59:13 +07:00
|
|
|
**2. Run it**
|
2025-07-31 01:10:30 +07:00
|
|
|
- Enter `src/Oh.My.Stitcher/bin/Release/net8.0/linux-arm64/publish`
|
2025-07-31 01:23:31 +07:00
|
|
|
- `ASPNETCORE_URLS="http://+:5000" ASSET_PATH_RO="/path/to/tiles" ./Oh.My.Stitcher`
|
2025-07-31 01:59:13 +07:00
|
|
|
- Go to http://ip-address:5000/
|
2025-07-31 01:10:30 +07:00
|
|
|
|
|
|
|
|
## Caching
|
|
|
|
|
|
|
|
|
|
For better performance, this stitcher use caching mechanism. The full image size would be GigaBytes!!!, so
|
|
|
|
|
the cache is limited, max size that can be cached: 720 x 720 x 128 (approximately 70MB).
|
|
|
|
|
It uses OS temporary directory (`Path.GetTempPath` or `/tmp`), please make sure it's writable.
|
|
|
|
|
|
|
|
|
|
No, this doesn't break the rule, the cache is created and used AFTER the first API request.
|
|
|
|
|
|
|
|
|
|
Use cases:
|
|
|
|
|
- consecutive request with the same rect and scale (e.g. "A1:AE55" then "AE1:A55")
|