How can I splice multiple short images into a long one? How can I splice multiple short images into a long one?
Reply content:
How can I splice multiple short images into a long one?
$ V) {$ source [$ k] ['source'] = Imagecreatefromjpeg ($ v ); $ source [$ k] ['size'] = getimagesize ($ v);} // imagecopy ($ target_img, $ source [0] ['source'], 2, 2, 0, 0, $ source [0] ['size'] [0], $ source [0] ['size'] [1]); // imagecopy ($ target_img, $ source [1] ['source'], 2, $ source [1] ['size'] [0], $ source [1] ['size'] [1]); $ num1 = 0; $ num = 1; $ tmp = 2; $ tmpy = 2; // spacing between images for ($ I = 0; $ I <4; $ I ++) {imagecopy ($ target_img, $ sou Rce [$ I] ['source'], $ tmp, $ tmpy, 0, 0, $ source [$ I] ['size'] [0], $ source [$ I] ['size'] [1]); $ tmp = $ tmp + $ source [$ I] ['size'] [0]; $ tmp = $ tmp + 5; if ($ I = $ num) {$ tmpy = $ tmpy + $ source [$ I] ['size'] [1]; $ tmpy = $ tmpy + 5; $ tmp = 2; $ num = $ num + 3;} Imagejpeg ($ target_img, 'pin.jpg ');?>
Imagecopyresample.