Hallo zusammen, ich weiß grad nichtm ehr weiter. Probier schon seit ner Stunde rum und find keinen Fehler, will ein Bild mithilfe PHP verkleinern.
Findet ihr einen Fehler im Skript?
Folgenden Fehler bekomme ich:
Warning: imagecopyresampled(): supplied argument is not a valid Image resource in ......
-------------------------------------------------
$bildpfad = "http://www.ju-manching.de/profilbild/profilbilder/tmp/thai.jpg"
$bildtyp = getimagesize($bildpfad);
$bildbreite= $bildtyp[0];
$bildhoehe = $bildtyp[1];
$hoch = 450;
$breit = ceil($bildbreite*$hoch/$bildhoehe);
$bildneu = imagecreatetruecolor($breit,$hoch);
switch($bildtyp){
case "1":
$altbildtmp = imagecreatefromgif($bildpfad);
break;
case "2":
$altbildtmp = imagecreatefromjpeg($bildpfad);
break;
case "3":
$altbildtmp = imagecreatefrompng($bildpfad);
break;
}
imagecopyresampled($bildneu,$altbildtmp,0,0,0,0,$breit,$hoch,$bildbreite,$bildhoehe);
header("Content-Type: image/jpeg");
imagejpeg($bildneu,"",100);
---------------------------------
GD Support ist enabled, jpeg und alle anderen Formate enabled