Jump to content

Merging 2 images


Minase

Recommended Posts

Hy

i do have an JPG image and an PNG one.

I did try with diverse functions but it doesnt work.

<?php
header("Content-type: image/png");
$im = imagecreatefrompng("2_1.png");
$im2 = imagecreatefromjpeg("1_1.jpg");
// merge the same image onto itself
imagecopymerge($im2, $im, 150, 150, 10, 10, 40, 40);
imagepng($im);
imagedestroy($im);

?>

 

that is my code,but the background (from jpg image is black ,its like it cant find the image location)

 

thanks

Link to comment
https://forums.phpfreaks.com/topic/117951-merging-2-images/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.