Fix output type

git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@206117 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
Jakub Vrana 2006-01-30 14:34:34 +00:00
parent f6664548e0
commit 776ed98f3b
3 changed files with 8 additions and 7 deletions

View file

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.4 $ -->
<!-- $Revision: 1.5 $ -->
<!-- splitted from ./en/functions/image.xml, last change in rev 1.2 -->
<refentry id="function.imageloadfont">
<refnamediv>
@ -75,6 +75,7 @@
<programlisting role="php">
<![CDATA[
<?php
header("Content-type: image/png");
$im = imagecreatetruecolor(50, 20);
$black = imagecolorallocate($im, 0, 0, 0);
$white = imagecolorallocate($im, 255, 255, 255);

View file

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.8 $ -->
<!-- $Revision: 1.9 $ -->
<!-- splitted from ./en/functions/image.xml, last change in rev 1.7 -->
<refentry id="function.imagepsloadfont">
<refnamediv>
@ -24,7 +24,7 @@
<programlisting role="php">
<![CDATA[
<?php
header("Content-type: image/jpeg");
header("Content-type: image/png");
$im = imagecreatetruecolor(350, 45);
$black = imagecolorallocate($im, 0, 0, 0);
$white = imagecolorallocate($im, 255, 255, 255);
@ -32,7 +32,7 @@ imagefilledrectangle($im, 0, 0, 349, 44, $white);
$font = imagepsloadfont("bchbi.pfb"); // or locate your .pfb files on your machine
imagepstext($im, "Testing... It worked!", $font, 32, $white, $black, 32, 32);
imagepsfreefont($font);
imagejpeg($im, "", 100); //for best quality...your mileage may vary
imagepng($im);
imagedestroy($im);
?>
]]>

View file

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.10 $ -->
<!-- $Revision: 1.11 $ -->
<!-- splitted from ./en/functions/image.xml, last change in rev 1.2 -->
<refentry id="function.imagestring">
<refnamediv>
@ -42,8 +42,8 @@ $textcolor = imagecolorallocate($im, 0, 0, 255);
imagestring($im, 5, 0, 0, "Hello world!", $textcolor);
// output the image
header("Content-type: image/jpeg");
imagejpeg($im);
header("Content-type: image/png");
imagepng($im);
?>
]]>
</programlisting>