WCM - Das österreichische Computer Magazin Forenübersicht
 

Zurück   WCM Forum > Rat & Tat > Programmierung

Programmierung Rat & Tat für Programmierer

Microsoft KARRIERECAMPUS

 
 
Themen-Optionen Ansicht
Alt 27.07.2004, 22:13   #5
jak
Inventar
 
Registriert seit: 13.06.2001
Beiträge: 1.830


Standard

[GD Version] => bundled (2.0.12 compatible) (bei mir)
bzw. bundled (2.0.23 compatible) (am Server)

Der Code ist im Moment nicht gerade ein Beispiel schöner Programmierung...

PHP-Code:
<?php
error_reporting
(E_ALL E_NOTICE);

/*
logo.php
Generates the header logo
*/
if(!$width){$width=480;}
$height=100;

// Create a new blank image
$im imageCreate($width,$height);

// Allocate the Colors to be used (l is for logo);
$l_orange=imageColorAllocate($im,248,152,29);
$l_red=imageColorAllocate($im,173,17,21);
$l_w=imageColorAllocate($im,255,255,255);

//Fill the image
imagefilledrectangle($im,0,0,$width,$height/2,$l_red);
imagefilledrectangle($im,0,$height/2,$width,$height,$l_orange);
$r=$width*3;
imagefilledellipse ($im,$width/2$width*3$r$r$l_orange);

//a²+b²=c², the two smaller circles are c-$r.
//$r2=sqrt(($width*$width)/4+(($height*$height*25)))*2.03-$r;


imagefilledellipse($im,0,-h*2.5,$r,$r$l_w);


//Send the headers
header('Content-type: image/png');

//Output the image as a JPEG
imagePNG($im);

//Delete the image from memory
imageDestroy($im);
?>
Im Moment funktioniert das noch überhauptnicht, ich muss mir erst ausdenken, wie ich den Radius des Kreises von der Breite des Bildes abhängig mache.

Steck' aber nicht zuviel Gehirnschmalz hinein, vielleicht verwende ich einfach ein Bild das ich mit imagecopyresized bearbeite.

Jak
____________________________________
Join the DNRC | Godwin\'s Law (thx@stona)
Documentation is like sex: If it\'s good, it\'s very, very good. If it\'s bad, it\'s better than nothing.
\"In theory, theory and practice are the same. In practice, they are not\" (Lawrence Berra)
jak ist offline   Mit Zitat antworten
 


Aktive Benutzer in diesem Thema: 1 (Registrierte Benutzer: 0, Gäste: 1)
 

Forumregeln
Es ist Ihnen nicht erlaubt, neue Themen zu verfassen.
Es ist Ihnen nicht erlaubt, auf Beiträge zu antworten.
Es ist Ihnen nicht erlaubt, Anhänge hochzuladen.
Es ist Ihnen nicht erlaubt, Ihre Beiträge zu bearbeiten.

BB-Code ist an.
Smileys sind an.
[IMG] Code ist an.
HTML-Code ist aus.

Gehe zu


Alle Zeitangaben in WEZ +2. Es ist jetzt 05:57 Uhr.


Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Forum SEO by Zoints
© 2009 FSL Verlag