Ciao, ho un problema e non riesco a trovare nulla sul forum, dovrei poter fondere 2 immagini.
Ho lo script ke salva un immagini piccola in una temp_small e un immagine grande in temp_big, ora dovrei come ultimo portare le 2 immagini in altre 2 cartelle ma in quella grande sovrapporre un immagine png per i copyright.
ho trovato questo
Codice PHP:
$image = "immagineoriginale.jpg";
$overlay = 'copiright.png';
$w_offset = 0;
$h_offset = 0;
$extension = strtolower(substr($image, strrpos($image, ".") + 1));
switch ($extension)
{
case 'jpeg':
case 'jpg':
$background = imagecreatefromjpeg($image);
break;
default:
die("Image is of unsupported type.");
}
$swidth = imagesx($background);
$sheight = imagesy($background);
imagealphablending($background, true);
$overlay = imagecreatefrompng($overlay);
$owidth = imagesx($overlay);
$oheight = imagesy($overlay);
imagecopy($background, $overlay, $swidth - $owidth - $w_offset, $sheight - $oheight - $h_offset, 0, 0, $owidth, $oheight);
header("Content-type: image/jpg");
header("Content-Disposition: filename=" . $image);
imagepng($background);
imagedestroy($background);
imagedestroy($overlay);
funziona ma il problema è che non mi da una variabile su cui lavorare, mi stampa l'immagine a video e basta. cè un sistema per sovrapporre le immagini determinare una nuova variabile e spostare l'immagine in un'altra cartella???
thx mille sin da ora.