ragazzi non riseco a creare questo Watermark vi posto il codice:
xk mi da l'errore che l'immagine o il watermark non viene caricato!!?Codice PHP:<?php
$foto1 = $_POST['foto1'];
$main_img = $foto1;
$watermark_img = "a.gif";
$padding = 3;
$opacity = 80;
$watermark = imagecreatefromgif($watermark_img);
$image = imagecreatefromjpeg($main_img);
if(!$image || !$watermark) die("Errore: L'immagine o il watermaker non è stato caricato!");
$watermark_size = getimagesize($watermark_img);
$watermark_width = $watermark_size[0];
$watermark_height = $watermark_size[1];
$image_size = getimagesize($main_img);
$dest_x = $image_size[0] - $watermark_width - $padding;
$dest_y = $image_size[1] - $watermark_height - $padding;
imagecopy($image, $watermark, $dest_x, $dest_y, 0, 0, $watermark_width, $watermark_height, $opacity);
$a=rand(1, 9);
$b=rand(1, 9);
$c=rand(1, 9);
$d=rand(1, 9);
$e=rand(1, 9);
$f=rand(1, 9);
$ante=$a.$b.$c.$d.$e.$f;
$uploaddir = "./uploads/";
$uploadfile = $ante .$_FILES['foto1']['name'];
$uploadfile1 = $uploaddir .$ante .$_FILES['foto1']['name'];
if (move_uploaded_file($_FILES['foto1']['tmp_name'], "$uploadfile1")){
echo "[b]$fname1[/b]caricato con successo
";
$result = mysql_query ("insert into raduni_foto(foto,titolo,r_id) values('$uploadfile1','$titolo','$id')");
}
if($result) { echo"<script language=javascript>";
echo"document.location.href='invia_r.php?id=$id'";
echo"</script>";
} else
echo"Inserimento fallito".mysql_error();
}
?>

Rispondi quotando