PHP imagecharup - 垂直地画一个字符
PHP 教程
· 2019-01-31 09:44:30
imagecharup — 垂直地画一个字符。
语法
bool imagecharup ( resource $image , int $font , int $x , int $y , string $c , int $color )
imagecharup() 将字符 c 垂直地画在 image 指定的图像上,位于 x,y(图像左上角为 0, 0),颜色为 color。如果 font 为 1,2,3,4 或 5,则使用内置的字体。
实例
<?php $im = imagecreate(100,100); $string = 'Note that the first letter is a N'; $bg = imagecolorallocate($im, 255, 255, 255); $black = imagecolorallocate($im, 0, 0, 0); // 在白色的背景上输出黑色的 "Z" imagecharup($im, 3, 10, 10, $string, $black); header('Content-type: image/png'); imagepng($im); ?>
以上实例输出结果的图片如下:
相关文章
- imagechar() 水平地画一个字符。
- imageloadfont() 载入一新字体。
点击查看所有 PHP 教程 文章: https://www.codercto.com/courses/l/5.html
HTTP Essentials
Stephen A. Thomas、Stephen Thomas / Wiley / 2001-03-08 / USD 34.99
The first complete reference guide to the essential Web protocol As applications and services converge and Web technologies not only assume HTTP but require developers to manipulate it, it is be......一起来看看 《HTTP Essentials》 这本书的介绍吧!