Hallo Felix, also das hab ich jetzt gefunden. Funzt zwar nur auf jpg aber ich werd versuchen das ding noch umzubauen.
<?php
$thumbsize=100;
$imgfile = "P F A D";
header('Content-type: image/jpeg');
list($width, $height) = getimagesize($imgfile);
$imgratio=$width/$height;
if ($imgratio>1){
$newwidth = $thumbsize;
$newheight = $thumbsize/$imgratio;}
else{
$newheight = $thumbsize;
$newwidth = $thumbsize*$imgratio;}
$thumb = ImageCreateTrueColor($newwidth,$newheight);
$source = imagecreatefromjpeg($imgfile);
imagecopyresized($thumb, $source, 0, 0, 0, 0, $newwidth, $newheight, $width, $height);
imagejpeg($thumb,"P F A D",50);
print "Script durchlaufen<br><br><img src="P F A D">";
?>