Skip to content

Latest commit

 

History

History
21 lines (14 loc) · 488 Bytes

README.md

File metadata and controls

21 lines (14 loc) · 488 Bytes

Minecraft Skin

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);