A .NET console application that creates a visual mosaic of contributor avatars for .NET Core releases. This tool downloads GitHub profile pictures of contributors to a specific .NET Core version and arranges them into a beautiful mosaic image.
ContributorAvatars:
- Fetches contributor data for .NET Core 8.0.0 from Microsoft's official contributor JSON
- Downloads GitHub avatar images (200x200px) for each contributor
- Creates a mosaic image arranging all avatars in a grid layout
- Automatically calculates optimal grid dimensions to create a 16:9 aspect ratio
- Smart Grid Layout: Automatically calculates the optimal grid dimensions (width × height) to create a visually appealing 16:9 aspect ratio
- Progress Tracking: Uses Spectre.Console to display download progress in the terminal
- Intelligent Caching: Skips downloading avatars that already exist locally
- Random Arrangement: Shuffles avatar positions for unique results each run
- Error Handling: Validates downloaded images (minimum 1800 bytes) to filter out placeholder images
- Image Size Optimization: Automatically adjusts the number of avatars to fit evenly into the calculated grid
- .NET 10.0 SDK or later
- ImageMagick (optional, for manual image manipulation)
-
Clone this repository:
git clone https://github.com/jongalloway/ContributorAvatars.git cd ContributorAvatars -
Restore dependencies:
dotnet restore
-
Build the project:
dotnet build
Run the application:
dotnet runThe program will:
- Display the total number of contributors found
- Show a progress bar while downloading avatars
- Generate the mosaic image
- Display statistics about the generated image
- Save the final image as
contributors.pngin the project directory
- Individual Avatars: Downloaded to the
images/directory - Final Mosaic: Saved as
contributors.pngin the project root
The program outputs an ImageMagick command that you can use to manually adjust the mosaic:
magick montage -geometry 200x200+0+0 -tile {w}x{h} images/*.png contributors.png- Magick.NET-Q16-AnyCPU (v14.9.1): .NET wrapper for ImageMagick, used for image processing and montage creation
- Spectre.Console (v0.53.0): Library for creating beautiful console applications with progress bars and status displays
- Data Retrieval: Fetches contributor information from
https://dotnet.microsoft.com/blob-assets/json/thanks/core.json - Filtering: Extracts contributors specifically for version 8.0.0
- Avatar Download: Downloads profile pictures from
https://www.github.com/{username}.png?size=200 - Grid Calculation: Computes grid dimensions to approximate 16:9 ratio using the formula:
- Height = √(total_avatars / 1.7778)
- Width = Height × 1.7778
- Mosaic Creation: Uses ImageMagick's montage functionality to arrange avatars with:
- Geometry: 200x200 pixels per avatar
- Border width: 0
- Background: Transparent
Total contributors: 627
Downloading... [████████████████████████████] 627/627
Removing 3 random avatars to fit an even multiple.
Generating image...
Total avatars downloaded: 627
Image written to contributors.png
Use the following to tweak and generate a mosaic:
magick montage -geometry 200x200+0+0 -tile 33x19 images/*.png contributors.png
Press any key to quit.
MIT License - see LICENSE.txt for details.
This project celebrates the amazing contributors to .NET Core. Thank you to everyone who has contributed to making .NET better!