I am trying to merge two images using PHP code below:
$image1=imagecreatefrompng($url1);
$image2=imagecreatefrompng($url2);
$final = imagecreatetruecolor($w, $h);
$backgroundColor = imagecolorallocate($final, 255, 255, 255);
imagefill($final, 0, 0, $backgroundColor);
imagecopy($final, $image1, 0,0,0,0,$w,$h);
imagecopy($final, $image2, 0,0,0,0,$w,$h);
After merging, I get a pink shade on the generated images. Please help. How can I resolve it?
Original images:
Resulting merged image: