Czytałem manuala odnośnie imagecopymerge i chciałem zastosować tą funkcję u siebie w skrypcie.
<?php
function dodzdjecie () {
$this->nazywaniefot();
$this->img = imagecreatefromjpeg("$this->zdjecie");
$this->width = imagesx($this->img);
$this->height = imagesy($this->img);
$this->height_mini = $this->row2['jak_ustawienia'];
$this->width_mini = $this->row['jak_ustawienia'];
$this->img_mini = imagecreatetruecolor($this->width_mini, $this->height_mini);
imagecopyresampled($this->img_mini, $this->img, 0, 0, 0, 0, $this->width_mini , $this->height_mini, $this->width , $this->height);
imagejpeg($this->img_mini, "$this->hotelnazwa2", 80);
imagedestroy($this->img);
imagedestroy($this->img_mini);
header("Content-type: image/jpeg"); imagecopymerge($this->hotelnazwa2 , tlo.gif , 240 , 100 , 220 , 28 , 221 , 30 , 50);
echo "Udało Ci się wgrać $this->hotelnazwa2";
}
?>
Funkcja się jednak nie wykonuje i wyświetla się błąd: Warning: imagecopymerge(): supplied argument is not a valid Image resource in /home/francusk/public_html/emme/panel/dodajfotke.php on line 239.
Z góry będę wdzięczny za podpowiedzenie powodu tego błędu.