A high-performance, Minotar-like skin avatar API for Ely.by, built with .NET 9 and SixLabors.ImageSharp.
- Ely.by Integration: Fetches skins directly from Ely.by's skin system.
- Smart Rendering:
- Avatar: 2D Face + Hat layer.
- Bust: Head & Shoulders view with armor layer.
- Full Body: Front and Back views of the complete skin.
- Slim Skin Support: Automatically detects and correctly renders "Alex" (slim/3px arm) models based on Ely.by metadata.
- Dynamic Favicons: Browser tabs show the avatar of the user being viewed via smart headers and routing.
- Performance: In-memory caching for skin data to reduce external API calls.
- .NET 9 SDK
- AspNet Runtime 9
-
Restore dependencies:
dotnet restore
-
Run the application:
dotnet run
-
Open
http://localhost:5000in your browser.
All endpoints support an optional size parameter (default: 180, min: 8, max: 512).
GET /avatar/{username}?size={pixels}
GET /{username}/{size}
GET /{username}/{size}.png
Returns the standard face view (8x8 head + hat).
GET /bust/{username}?size={pixels}
GET /bust/{username}/{size}
GET /bust/{username}/{size}.png
Returns a head and shoulders render, including the second layer.
GET /body/{username}?size={pixels}
GET /body/{username}/{size}
GET /body/{username}/{size}.png
Returns the full body front view.
GET /body/back/{username}?size={pixels}
GET /body/back/{username}/{size}
GET /body/back/{username}/{size}.png
Returns the full body back view.
GET /skin/{username}
GET /download/{username}
Returns the unmodified skin texture. /download/ forces a file download.
Controllers/:AvatarController.cs: Handles image generation endpoints.HomeController.cs: Serves the index page and handles favicon logic.
Services/:ElyByService.cs: Fetches skin textures and metadata (detects slim models).ImageProcessingService.cs: Handles cropping, resizing, and compositing using ImageSharp.
Program.cs: Application entry point and dependency injection configuration.