mirror of
https://github.com/sigmasternchen/php-doc-en
synced 2025-03-16 00:48:54 +00:00
Added example for psloadfont
git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@48143 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
parent
4a8bbb1abc
commit
e212729348
1 changed files with 17 additions and 0 deletions
|
@ -2151,6 +2151,23 @@ ImagePng($im);
|
|||
function returns false and prints a message describing what went
|
||||
wrong.
|
||||
</para>
|
||||
<para>
|
||||
<programlisting role="php">
|
||||
<?php
|
||||
Header ("Content-type: image/jpeg");
|
||||
$im = ImageCreate (350, 45);
|
||||
$black = ImageColorAllocate ($im, 0, 0, 0);
|
||||
$white = ImageColorAllocate ($im, 255, 255, 255);
|
||||
$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
|
||||
ImageDestroy ($im);
|
||||
?>
|
||||
</programlisting role="php">
|
||||
</para>
|
||||
<para>
|
||||
See also <function>ImagePSFreeFont</function>.
|
||||
</para>
|
||||
|
|
Loading…
Reference in a new issue