Skip to content

mattiabasone/minecraft-skin

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

Small PHP library for manipulating Minecraft skins

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages