For Programmers: Free Programming Magazines  


Home > Archive > PHP Documentation > January 2006 > cvs: phpdoc /en/reference/image/functions imageloadfont.xml imagepsloadfont.xml image









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author cvs: phpdoc /en/reference/image/functions imageloadfont.xml imagepsloadfont.xml image
Jakub Vrana

2006-01-30, 6:57 pm

vrana Mon Jan 30 14:34:34 2006 UTC

Modified files:
/phpdoc/en/reference/image/functions imageloadfont.xml
imagepsloadfont.xml
imagestring.xml
Log:
Fix output type

http://cvs.php.net/viewcvs.cgi/phpd...5&diff_format=u
Index: phpdoc/en/reference/image/functions/imageloadfont.xml
diff -u phpdoc/en/reference/image/functions/imageloadfont.xml:1.4 phpdoc/en/reference/image/functions/imageloadfont.xml:1.5
--- phpdoc/en/reference/image/functions/imageloadfont.xml:1.4 Wed Aug 10 04:48:11 2005
+++ phpdoc/en/reference/image/functions/imageloadfont.xml Mon Jan 30 14:34:34 2006
@@ -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);
http://cvs.php.net/viewcvs.cgi/phpd...9&diff_format=u
Index: phpdoc/en/reference/image/functions/imagepsloadfont.xml
diff -u phpdoc/en/reference/image/functions/imagepsloadfont.xml:1.8 phpdoc/en/reference/image/functions/imagepsloadfont.xml:1.9
--- phpdoc/en/reference/image/functions/imagepsloadfont.xml:1.8 Mon Jan 30 14:32:54 2006
+++ phpdoc/en/reference/image/functions/imagepsloadfont.xml Mon Jan 30 14:34:34 2006
@@ -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 @@
$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);
?>
]]>
http://cvs.php.net/viewcvs.cgi/phpd...1&diff_format=u
Index: phpdoc/en/reference/image/functions/imagestring.xml
diff -u phpdoc/en/reference/image/functions/imagestring.xml:1.10 phpdoc/en/reference/image/functions/imagestring.xml:1.11
--- phpdoc/en/reference/image/functions/imagestring.xml:1.10 Mon Jan 30 14:31:03 2006
+++ phpdoc/en/reference/image/functions/imagestring.xml Mon Jan 30 14:34:34 2006
@@ -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 @@
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>
Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com