Comment ajouter du texte à une image avec la bibliothèque PHP GD

J'ai de la création de l'image de code dans image_creator.

<?php
header("Content-Type: image/jpeg");
$im = ImageCreateFromGif("photo.gif"); 
$black = ImageColorAllocate($im, 255, 255, 255);
$start_x = 10;
$start_y = 20;
Imagettftext($im, 12, 0, $start_x, $start_y, $black, 'verdana.ttf', "text to write");
Imagejpeg($im, '', 100);
ImageDestroy($im);
?> 

Le fichier pour l'image de sortie est image.php et a code ci-dessous

<html>
<head>
</head>
<body>
    <img src="http://localhost/image_creator.php"/> 
</body>

</html>

Quand je le lance image.php, j'ai juste une page blanche. Pourquoi est-il si?

source d'informationauteur roy mathew