Mailinglisten-Archive |
> $pfad="gdtest.jpg";
> imagecopyresized($pfad, "test.jpg", 0, 0, 0, 0, 100, 133, 300, 400);
Falsch. Schnibbel dir hier mal das richtige raus, ich kann dein Szenario
nicht nachvollziehen.
<?
$image = "torsten.jpg"; file://Quellbild
$width = "300"; file://Ausgabebreite
$height = "400"; file://Ausgabehoehe
$imagetype = "png"; file://Ausgebetyp: png, gif, jpeg
$i5 = explode(".",$image);
if($i5[count($i5) - 1] == "png"){ // Wenn Dateiendung png...
$i1 = ImageCreateFromPNG($image);
} else if ($i5[count($i5) - 1] == "gif"){
$i1 = ImageCreateFromGIF($image);
} else if ($i5[count($i5) - 1] == "jpg" || $i5[count($i5) - 1] == "jpeg"){
$i1 = ImageCreateFromJPEG($image);
}
header ('Content-type: image/'.$imagetype); // Header für Imagetype
$i2 = imagecreate($width,$height);
imagecopyresized ($i2, $i1, 0, 0, 0, 0, $width, $height, ImageSX($i1),
ImageSY($i1));
$a3 = "Image";
$a4 = $a3.$imagetype;
$a4 ($i2);
?>
Hoffe es hilft, hab das mal in ner nacht geschreiben ohne es zu brauchen.
CU
Stefan
php::bar PHP Wiki - Listenarchive