imagecopy変数の特定の画像に問題があり、動作中の例と動作していない例の$url両方にあるにもかかわらず表示さPNGれません。$local変数はサーバーから透過画像をロードし、$url変数はリモート サーバーからロードします。のテスト透過画像をインクルードしました$local。
働く:
<?php
header("Content-type: image/png");
$url = imagecreatefrompng("url_removed.png");
$local = imagecreatefrompng("http://url_removed.png");
imagecopy($url, $local, 0, 0, 0, 0, 100, 100);
imagepng($url);
imagedestroy($url);
imagedestroy($local);
?>
動作していません:
<?php
header("Content-type: image/png");
$url = imagecreatefrompng("url_removed.png");
$local = imagecreatefrompng("http://url_removed.png");
imagecopy($url, $local, 0, 0, 0, 0, 100, 100);
imagepng($url);
imagedestroy($url);
imagedestroy($local);
?>
私も試してみimagecreatestringましたがfile_get_contents、それも機能しますが、特定のPNG画像は同様に機能しませんimagecreatefrompng
すべてが終わった後、それは何か関係があると思いますimagecopy....これを修正するにはどうすればよいですか、またはこれを行う別の簡単な方法はありますか?