SuperMaker.AiMinecraftImage
1767.843.808.67
dotnet add package SuperMaker.AiMinecraftImage --version 1767.843.808.67
NuGet\Install-Package SuperMaker.AiMinecraftImage -Version 1767.843.808.67
<PackageReference Include="SuperMaker.AiMinecraftImage" Version="1767.843.808.67" />
<PackageVersion Include="SuperMaker.AiMinecraftImage" Version="1767.843.808.67" />
<PackageReference Include="SuperMaker.AiMinecraftImage" />
paket add SuperMaker.AiMinecraftImage --version 1767.843.808.67
#r "nuget: SuperMaker.AiMinecraftImage, 1767.843.808.67"
#:package SuperMaker.AiMinecraftImage@1767.843.808.67
#addin nuget:?package=SuperMaker.AiMinecraftImage&version=1767.843.808.67
#tool nuget:?package=SuperMaker.AiMinecraftImage&version=1767.843.808.67
ai-minecraft-image
This NuGet package provides a simple and efficient way to convert images into Minecraft skins programmatically within your .NET applications. It offers straightforward methods for image manipulation and skin generation.
Installation
To install the ai-minecraft-image package, use the following command in your .NET project:
bash
dotnet add package ai-minecraft-image
Usage Examples
Here are a few examples demonstrating how to use the ai-minecraft-image package:
Example 1: Basic Image to Skin Conversion
This example demonstrates the simplest use case - loading an image from a file and converting it into a Minecraft skin. csharp using AiMinecraftImage;
// Load an image from file string imagePath = "path/to/your/image.png"; var skinConverter = new SkinConverter(); byte[] skinData = skinConverter.ConvertImageToSkin(imagePath);
// skinData now contains the byte array representing the Minecraft skin. // You can save it to a file or use it in your application. System.IO.File.WriteAllBytes("output_skin.png", skinData);
Example 2: Converting a Stream to a Skin
This example shows how to convert an image from a Stream (e.g., retrieved from a web request) to a Minecraft skin.
csharp
using AiMinecraftImage;
using System.Net.Http;
// Get image stream from a web request (example) string imageUrl = "https://example.com/image.png"; using (HttpClient client = new HttpClient()) { using (Stream imageStream = await client.GetStreamAsync(imageUrl)) { var skinConverter = new SkinConverter(); byte[] skinData = skinConverter.ConvertImageToSkin(imageStream);
// skinData now contains the byte array representing the Minecraft skin.
System.IO.File.WriteAllBytes("output_skin_from_stream.png", skinData);
}
}
Example 3: Resizing Images before Conversion
Sometimes you might need to resize your image before converting it to a skin. This package does not handle resizing, but you can use standard .NET image processing libraries for this purpose before calling the skin conversion. csharp using AiMinecraftImage; using System.Drawing; using System.Drawing.Drawing2D; using System.Drawing.Imaging;
// Load and resize the image (example using System.Drawing) string imagePath = "path/to/your/large_image.png"; Image originalImage = Image.FromFile(imagePath); Image resizedImage = new Bitmap(64, 64); // Minecraft skin resolution
using (Graphics graphics = Graphics.FromImage(resizedImage)) { graphics.CompositingQuality = CompositingQuality.HighQuality; graphics.InterpolationMode = InterpolationMode.HighQualityBicubic; graphics.SmoothingMode = SmoothingMode.HighQuality; graphics.DrawImage(originalImage, 0, 0, 64, 64); }
// Convert the resized image to a skin. using (MemoryStream ms = new MemoryStream()) { resizedImage.Save(ms, ImageFormat.Png); ms.Position = 0;
var skinConverter = new SkinConverter();
byte[] skinData = skinConverter.ConvertImageToSkin(ms);
System.IO.File.WriteAllBytes("output_resized_skin.png", skinData);
}
Example 4: Handling Errors
Gracefully handle potential exceptions during the skin conversion process. csharp using AiMinecraftImage; using System;
string imagePath = "path/to/your/image.png"; var skinConverter = new SkinConverter();
try { byte[] skinData = skinConverter.ConvertImageToSkin(imagePath); System.IO.File.WriteAllBytes("output_skin.png", skinData); } catch (Exception ex) { Console.WriteLine($"An error occurred during skin conversion: {ex.Message}"); // Log the exception or take other appropriate actions. }
Feature Summary
- Simple and easy-to-use API.
- Efficient image processing for Minecraft skin generation.
- Supports converting images from file paths and streams.
- Provides a byte array representation of the generated skin.
License
This project is licensed under the MIT License - see the LICENSE file for details.
This package is part of the ai-minecraft-image ecosystem. For advanced features and enterprise-grade tools, visit: https://supermaker.ai/image/blog/how-to-turn-your-image-into-minecraft-skin/
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net6.0 is compatible. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 was computed. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
-
net6.0
- No dependencies.
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 1767.843.808.67 | 155 | 1/8/2026 |