mattiabasone / minecraft-skin
Package for generating Minecraft avatars and skins from raw skin image
v1.0.1
2023-03-13 23:18 UTC
Requires
- php: ^8.2
- ext-gd: *
- ext-imagick: *
Requires (Dev)
- phpunit/phpunit: ^10.0
- vimeo/psalm: ^5.6
This package is auto-updated.
Last update: 2024-10-14 02:59:04 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);