$x) $s = $x; $nx = $s; $ny = round($nx/$x*$y); $a = imagecreatetruecolor($nx, $ny); ImageCopyResized($a, $im, 0, 0, 0, 0, $nx, $ny, $x, $y); $white=imageColorAllocate($a, 255, 255, 255); imageTTFText($a, 10, 0, 5, $ny-5, $white, "img/tahoma.ttf", $titlstr); Header("Content-type: image/jpeg"); imageJpeg($a); }; ?>