I am using the below code to merge two images, but it take avg of 6-7 sec for creating 16 images. Is there any way I can speed up my process?$image1=imagecreatefrompng('img/'.$value);$image2=imagecreatefrompng('img/'.$value1);$w=imagesx($image1);$h=imagesy($image1);imagecopy($image1,$image2,0,0,0,0,$w,$h);imagejpeg($image1,'final/'.$key.$key1.'.jpg');imagedestroy($image1);I also get a black backgroud. I do not want to add an extra layer as it will increase execution time.Below is basic detail1: images of size: 1000 * 10002: png + png = jpg image3: different image will combine i had already coded in way to avoid dupliacybelow i what i am trying to do like:http://www.gemvara.com/jewelry/emerald-isle-ring/emerald-cut-diamond-14k-white-gold-ring-with-diamond/by53here you can see new product is combination of stone and ring base.and has 4 different view i am trying to do like that
Optimizing execution time of merging images
php;performance;image