$maxW)?imagesx($iTmp):$maxW; $maxH+=imagesy($iTmp); } else { $maxW+=imagesx($iTmp); $maxH=(imagesy($iTmp)>$maxH)?imagesy($iTmp):$maxH; } array_push ($imgBuf,$iTmp); } $iOut = imagecreatetruecolor ($maxW,$maxH) ; $iOut = imagecreate ($maxW,$maxH) ; $pos=0; foreach ($imgBuf as $img) { if ($under) imagecopy ($iOut,$img,0,$pos,0,0,imagesx($img),imagesy($img)); else imagecopy ($iOut,$img,$pos,0,0,0,imagesx($img),imagesy($img)); $pos+= $under ? imagesy($img) : imagesx($img); imagedestroy ($img); } //header("Content-type: image/jpg"); imagealphablending($iOut, true); imagesavealpha($iOut, true); imagepng($iOut); ?>