Mailinglisten-Archive |
Ich habe es auf diese Art und Weise lösen können:
(Einige der Werte kommen per $_GET, andere sind als Klassen hinterlegt)
<?php
header ("Content-type: image/png");
$class = $_GET['class'];
switch($class) {
case 'statistics':
$width = 20;
$height = 230;
$alt = urldecode($_GET['alt']);
$textsize = 9;
$font = FONTS_PATH . 'verdana.ttf';
$rotate = 90;
break;
default:
$width = intval($_GET['width']);
$height = intval($_GET['height']);
$alt = urldecode($_GET['alt']);
$textsize = 11;
$font = FONTS_PATH . 'verdana.ttf';
$rotate = intval($_GET['rotate']);
break;
}
$im = @ImageCreate ($height, $width);
$background_color = ImageColorAllocate ($im, 255, 255, 255);
$text_color = ImageColorAllocate ($im, 0, 0, 0);
imagettftext ($im, $textsize, 0, 10, $textsize, $text_color, $font, $alt);
$rotate = imagerotate($im, $rotate, 0);
imagepng($rotate);
imagepng($im);
?>
php::bar PHP Wiki - Listenarchive