I set the size of the pictures as I want but imagecopy function spoils it. I want the upper picture's width to be same as the lower pisture's and put under the upper picture
i want to imagecopy paremeters. i want to this.paremeters. the black is one picture .red is two picture
my code is mixed.i am so sorry <?php echo' <form action="" method="post" enctype="multipart/form-data"> <input type="text" name="yazi"> <input type="file" name="resim" id="resim"> <input type="submit" value="gonder"> </form>'; $yazi=$_POST['yazi']; if(isset($_POST['yazi'])){ $resim=$_POST['resim']; $yazi=$_POST['yazi']; $resimadi=$_FILES['resim']['name']; $geciciyol=$_FILES['resim']['tmp_name']; $dosyayolu="resimler/$resimadi"; move_uploaded_file($geciciyol,$dosyayolu); sleep(2); $enboy=getimagesize($dosyayolu); $boy=$enboy[0]; $en=$enboy[1]; $resimadi=explode('.',$resimadi); $resim = imagecreate($en, $boy*25/100); $arkaplan = imagecolorallocate($resim, 250, 0, 0);//renkler $yazirengi = imagecolorallocate($resim, 0, 0, 0); imagestring($resim, 454, 0,5 , "$yazi", $yazirengi);//ikinci parametre saga dogru 3.ise asaga dogru çekiyor. imagepng($resim,"resimler/rsm$resimadi[0].png"); sleep(2); imagedestroy($resim); //header("content-type: image/jpeg"); $first=imagecreatefromjpeg("resimler/$resimadi[0].jpg"); #First $second=imagecreatefrompng("resimler/rsm$resimadi[0].png");#Second //This creates the two images that use #An image on the other imagecopy($first,$second,0,0,0,0,0,0); //<-- Coordinates #}... imagejpeg($first,'resimler/ikiresmibirlestirdik.jpg'); #Destroy both! imagedestroy($first); sleep(2); imagedestroy($second); } ?> PHP:
dimensions are variable.user is detect to dimensions. examle 1.image 700*300 2.image 700*25/100 * 300
already i set to size 1.image and 2.image.but image copy function is disrupt. my engilish is bad.i am sorry
Check this site out (set it to your native language) http://www.php.net/manual/en/function.imagecopy.php