how do i get the head of a player's skin and save it as png? i tried using gd: PHP: $skin_data = $sender->getSkin()->getSkinData(); $size = 48; $im = imagecreatefromstring($skin_data); $av = imagecreatetruecolor($size, $size); imagecopyresized($av, $im, 0, 0, 8, 8, $size, $size, 8, 8); imagecolortransparent($im, imagecolorat($im, 63, 0)); $png = imagepng($av); but returns Code: [19:45:12] [Server thread/CRITICAL]: ErrorException: "imagecreatefromstring(): gd warning: one parameter to a memory allocation multiplication is negative or zero, failing operation gracefully" (EXCEPTION)