Sign inSign up

c0dezer019/image2-server

By c0dezer019

•Updated about 2 months ago

Image
0

3.3K

c0dezer019/image2-server repository overview

⁠image2-server

FastAPI backend for Image2⁠ — converts uploaded images to ASCII/ANSI art grids and returns image metadata for the web UI.

⁠Quick start

docker run -p 8000:8000 image2-server

Then check GET http://localhost:8000/health → {"status": "ok"}.

⁠What's inside

  • Python 3.14-slim, multi-stage build
  • FastAPI + Uvicorn, served on port 8000
  • image2 conversion library (ASCII/ANSI grid rendering)
  • Per-IP rate limiting (slowapi) on conversion endpoints
  • Runs as non-root user app

⁠Endpoints

  • GET /health — health check
  • POST /analyze — image metadata (dimensions, etc.)
  • POST /convert — convert uploaded image to ASCII/ANSI art

⁠Configuration

No required environment variables or secrets. CORS-allowed origins are hardcoded in main.py — rebuild the image to add a new frontend origin.

⁠Limits

  • Max output grid: 600x600 cells, capped at 250,000 cells total
  • Oversized uploads are compressed rather than rejected

⁠Source

https://github.com/c0dezer019/Image2-Web⁠ (server/ directory)

Tag summary

Content type

Image

Digest

sha256:633d654e5…

Size

71 MB

Last updated

about 2 months ago

docker pull c0dezer019/image2-server