Bir php sitesindeki bir mektubun (jpg dosyası olarak kaydedilir) altına bir imza (png dosyası olarak kaydedilir) eklemek istiyorum. imagecopymerge
kullanıyorum, ancak isteğim yerine siyah bir görüntü dosyası oluşturur. Bu kodu da kullandım, ancak sonuç yok.Bir resmin Alt kısmına bir İmza nasıl eklenir?
function merge($filename_x, $filename_y, $filename_result) {
list($width_x, $height_x) = getimagesize($filename_x);
list($width_y, $height_y) = getimagesize($filename_y);
$image = imagecreatetruecolor($width_x + $width_y, $height_x);
$image_x = imagecreatefromjpeg($filename_x);
$image_y = imagecreatefromgif($filename_y);
imagecopy($image, $image_x, 0, 20, 30, 50, $width_x, $height_x);
imagecopy($image, $image_y, $width_x, 0, 10, 0, $width_y, $height_y);
imagejpeg($image, $filename_result);
imagedestroy($image);
imagedestroy($image_x);
imagedestroy($image_y);
}
merge('myimg.jpeg', 'first.gif', 'merged.jpg');
Sonuç nedir? –
Geçerli yoldaki (kaynak dosyanın bulunduğu) resimler var mı? Yolun doğru olduğundan ve dosyalara erişebildiğinden emin oldunuz mu? –
sadece siyah bir sayfa – sepehr2121