Johannes Kuhn: Ist das möglich: Formular senden, Bild als Antwort erhalten...

Beitrag lesen

Ist möglich, aber dafür benötigst du kein AJAX.

Als hier der Code für einen Beispiel-Bildgenerator

  
<?php  
Header ("Content-type: image/gif");  
$im = imagecreate (400, (int)$_REQUEST['size']);  
$back = ImageColorAllocate ($im, $_REQUEST['r1'], $_REQUEST['g1'], $_REQUEST['b1']);  
$cl = ImageColorAllocate ($im, $_REQUEST['r2'], $_REQUEST['g2'], $_REQUEST['b2']);  
ImageTTFText ($im, (int)$_REQUEST['size'], 0, 0, $_REQUEST['size'], $cl, "./lib/arial.ttf",  
              $_REQUEST['text']);  
ImageGif ($im);  
ImageDestroy ($im);  
?>  

Dan hier ein Formular:

  
<form action="image.php">  
Vordergrund:  
Rot: <input type="text" name="r1" />  
Gr&uuml;n: <input type="text" name="g2" />  
Blau: <input type="text" name="b1" />  
Hintergrund:  
Rot: <input type="text" name="r2" />  
Gr&uuml;n: <input type="text" name="g2" />  
Blau: <input type="text" name="b2" />  
Text: <input type="text" name="text" />  
Gr&ouml;&szlig;e: <imput type="text" name="text" />  
<input type="submit" value="Bild erzeugen" />  

Kann man abändern und verbessern...
aber ein Ansatz

Schönen Tag noch
Johannes