$skin = "http://www.skinme.cc/uniskin/textures/{$id}";
$skin = file_get_contents($skin);
$im = imagecreatefromstring($skin);
$size = 300;
$view = 'f';
$av = imagecreatetruecolor($size, $size);
$x = array('f' => 8, 'l' => 16, 'r' => 0, 'b' => 24);
imagecopyresized($av, $im, 0, 0, $x[$view], 8, $size, $size, 8, 8);
imagecolortransparent($im, imagecolorat($im, 63, 0));
imagecopyresized($av, $im, 0, 0, $x[$view] + 32, 8, $size, $size, 8, 8);
header('Content-type: image/png');
imagepng($av);
imagedestroy($im);
imagedestroy($av);
exit();
本作品採用《CC 協議》,轉載必須註明作者和本文連結