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
....これを修正するにはどうすればよいですか、またはこれを行う別の簡単な方法はありますか?