PHP Class App\services\Minecraft

Mostra file Open project: printempw/blessing-skin-server

Public Methods

Method Description
generateAvatarFromSkin ( $resource, integer $size, $view = 'f', $base64 = false ) : resource Cut and resize to get avatar from skin, HD support by
generatePreviewFromCape ( $resource )
generatePreviewFromSkin ( resource $resource, integer $size, boolean | string $side = false, boolean $base64 = false, integer $gap = 4 ) : resource Generate skin preview

Private Methods

Method Description
imageflip ( &$result, &$img, $rx, $ry, $x, $y, $size_x = null, $size_y = null )

Method Details

generateAvatarFromSkin() public static method

Cut and resize to get avatar from skin, HD support by
Author: https://github.com/jamiebicknell/Minecraft-Avatar/blob/master/face.php
public static generateAvatarFromSkin ( $resource, integer $size, $view = 'f', $base64 = false ) : resource
$size integer
return resource

generatePreviewFromCape() public static method

public static generatePreviewFromCape ( $resource )

generatePreviewFromSkin() public static method

Generate skin preview
public static generatePreviewFromSkin ( resource $resource, integer $size, boolean | string $side = false, boolean $base64 = false, integer $gap = 4 ) : resource
$resource resource
$size integer
$side boolean | string 'front' or 'back'
$base64 boolean Generate image from base64 string
$gap integer Gap size between front & back preview
return resource