I have developed a class for Minecraft in PHP, one of the most recent additions to the functions is a skin preview but I am having a little trouble working out the codes for the full body preview (head preview works fine), the code I am using for the head preview is as follows…
header('Content-Type: image/png');
$canvas = imagecreatetruecolor($size, $size);
$image = imagecreatefrompng($this->custom_skin($username));
imagecopyresampled($canvas, $image, 0, 0, 8, 8, $size, $size, 8, 8);
return imagepng($canvas);
https://github.com/nblackburn/minecraft/blob/master/class.minecraft.php
Any contributions would be a huge help to get this full body preview working.
Have a look at this skin template http://www.minecraftwiki.net/images/5/54/Skintemplate.png
Based on that the regions should be:
You may need to flip the arm and leg sections in order to get the left and right to be mirrored.
The above is just from memory but it should point you in the right direction. You shouldn’t use imagecopyresampled when upscaling since in this case you want to avoid interpolation.