我已將此代碼生成此圖片的一部分:My Minecraft skin (seriously, that is my image)爲什麼這個php代碼不會裁剪我的圖像?
但是,它不生成。圖像無效。我的代碼:
<?php
$username = "figgycity50";
$skin_php_data = file_get_contents ("http://s3.amazonaws.com/MinecraftSkins/".$username.".png");
$skin = imagecreatefrompng ($skin_php_data);
$hv = array('x' => 8, 'y' => 8, 'width' => 8, 'height' => 8);
$head = imagecrop($skin, $hv);
header('Content-Type: image/png');
imagepng($head);
?>
嘗試:'的error_reporting(E_ALL | E_STRICT)' - 關:尖:http://stackoverflow.com/help/dont-ask http://stackoverflow.com/help/on-topic HTTP ://stackoverflow.com/help/deleted-questions –