Hier der Code:
(Die ... stehen für den Uploadteil)
<?php
...
$pro = $_POST['pro'];
$bild = "$uploddir$newname$ext";
$pic = getimagesize($bild);
$oldbreite = $info[0];
$oldhoehe = $info[1];
$newbreite = round($oldbreite/$pro);
$newhoehe = round($oldhoehe/$pro);
$altesBild=ImageCreateFromJPEG("$bild");
$neuesBild=imageCreate($newbreite,$newhoehe);
imageCopyResized($neuesBild,$bild,0,0,0,0,$newbreite,$newhoehe,$oldbreite,$oldhoehe);
ImageJPEG($neuesBild);
echo '<img src="'.$neuesBild.'">';
?>
Und ich bekomme immer diesen Fehler angezeigt:
Zitat
Warning: imagecreate(): Invalid image dimensions in /usr/export/www/vhosts/funnetwork/hosting/goldnick/2/upload.php on line 48
Warning: imagecopyresized(): supplied argument is not a valid Image resource in /usr/export/www/vhosts/funnetwork/hosting/goldnick/2/upload.php on line 49
Warning: imagejpeg(): supplied argument is not a valid Image resource in /usr/export/www/vhosts/funnetwork/hosting/goldnick/2/upload.php on line 50
Warning: imagecopyresized(): supplied argument is not a valid Image resource in /usr/export/www/vhosts/funnetwork/hosting/goldnick/2/upload.php on line 49
Warning: imagejpeg(): supplied argument is not a valid Image resource in /usr/export/www/vhosts/funnetwork/hosting/goldnick/2/upload.php on line 50
Was ist an den Code falsch?
Hoffe es kann mir jemand weiterhelfen ...
Danke im voraus
MfG Nick
Dieser Beitrag wurde von keny bearbeitet: 22. April 2006 - 16:43

Hilfe
Neues Thema
Antworten


Nach oben


