hi guys.i am from turkey.my engilish is bad,sorry this code is , take in 2 images and merge but it is not working. my errors are; --------------------------------------------------------------------------------------------- Warning: imagecreatefromjpeg() [function.imagecreatefromjpeg]: gd-jpeg: JPEG library reports unrecoverable error: in C:\AppServ\www\index2.php on line 4 Warning: imagecreatefromjpeg() [function.imagecreatefromjpeg]: 'resimler/rsmpu.jpeg' is not a valid JPEG file in C:\AppServ\www\index2.php on line 4 Warning: imagesx(): supplied argument is not a valid Image resource in C:\AppServ\www\index2.php on line 15 Warning: imagesy(): supplied argument is not a valid Image resource in C:\AppServ\www\index2.php on line 16 Warning: imagecopy(): supplied argument is not a valid Image resource in C:\AppServ\www\index2.php on line 17 Warning: imagejpeg(): supplied argument is not a valid Image resource in C:\AppServ\www\index2.php on line 22 Warning: imagedestroy(): supplied argument is not a valid Image resource in C:\AppServ\www\index2.php on line 23 ----------------------------------------------------------------------------------------------------------------------------------- <?php ob_start(); $damga = imagecreatefromjpeg('resimler/pu.jpeg'); $foto = imagecreatefromjpeg('resimler/rsmpu.jpeg'); // Damganın kenar boşluklarını ayarlayıp resmin // yükseklik ve genişliğini alalım $sağ_boşluk = 10; $alt_boşluk = 10; $sx = imagesx($damga); $sy = imagesy($damga); // Damga resmini koordinatları belirterek kenar boşlukları ile // birlikte fotoğrafın üzerine kopyalayalım. imagecopy($foto, $damga, imagesx($foto) - $sx - $sağ_boşluk, imagesy($foto) - $sy - $alt_boşluk, 0, 0, imagesx($damga), imagesy($damga)); // Sonucu çıktılayıp belleği serbest bırakalım. //header("Content-type: image/jpeg"); imagejpeg($foto,"resimler/resimyuklemebasarili.jpg"); imagedestroy($foto); ob_end_flush(); ?> PHP:
try adding error_reporting(0); PHP: before ob start and make sure the image files are afailable. and the name n ext of image maybe case sensitive