このコードでエラーが発生しています
header ("Content-type: image/jpeg");
$nomphoto = "antigua.jpg";
// On charge d'abord les images
$source = imagecreatefrompng('logo.php');
$destination = imagecreatefromjpeg($nomphoto);
$largeur_source = imagesx($source);
$hauteur_source = imagesy($source);
$largeur_destination = imagesx($destination);
$hauteur_destination = imagesy($destination);
$destination_x = 0;
$destination_y = ($hauteur_destination / 1.5) - ($hauteur_source / 2);
imagecopymerge($destination, $source, $destination_x, $destination_y, 0, 0, $largeur_source, $hauteur_source, 60);
imagejpeg($destination);
logo.phpから写真を読み込めません
logo.php のコード
$imgPng = imagecreatefrompng("logo24.png");
imagealphablending($imgPng, true);
imageSaveAlpha($imgPng, true);
header("Content-type: image/png");
imagePng($imgPng);
png-24 画像に著作権を設定したい。logo.php は正常に動作しています。画像を取得できますが、imagecreatefrompng で使用すると動作しません。
imagecreatefrompng(file_get_contents('logo.php'));で試しました。しかし、それも機能していません。私が欲しいのは、私のpng-24著作権画像を私のjpgに置くことです(透明性を保つために)あなたは何か解決策がありますか?