mattiabasone/minecraft-skin

Package for generating Minecraft avatars and skins from raw skin image

v1.0.1 2023-03-13 23:18 UTC

This package is auto-updated.

Last update: 2024-11-14 03:18:02 UTC


README

This package provide some utilities for manipulating Minecraft skins.

For instance, if you want to render an avatar:

use MattiaBasone\MinecraftSkin\Flat\Avatar;
use MattiaBasone\MinecraftSkin\Component\Side;

$avatar = new Avatar("/path/to/minecraft-skin.png");

$avatar->render(256, Side::FRONT);

// Get the \GdResource
$resource = $avatar->getResource();
// or as string
$rawImage = (string) $avatar;
file_put_contents("/my/output/file.png", $rawImage);