The following code is not displaying the image from IIS 6/PHP 5.2.9. It works OK from XAMPP (PHP 5.3)
$img = @imagecreate(200, 200);
$background_color = imagecolorallocate($img, 0, 0, 0);
$text_color = imagecolorallocate($img, 233, 14, 91);
imagestring($img, 12, 60, 90, 'image here', $text_color);
header('Last-Modified: ' . date('D, d M Y H:i:s'));
header('Content-type: image/jpg');
header('Content-Disposition: inline; filename=blank_jpeg.jpg');
ob_start();
imagejpeg($img);
imagedestroy($img);
$jpeg = ob_get_contents();
ob_end_clean();
header ('Content-length: ' . strlen($jpeg));
echo $jpeg;
exit;