导航首页 » 技术教程 » PHP:imagecharup()的用法_GD库图像处理函数
PHP:imagecharup()的用法_GD库图像处理函数 152 2023-12-15   

imagecharup

(PHP 4, PHP 5)

imagecharup — 垂直地画一个字符

说明

bool imagecharup ( resource $image , int $font , int $x , int $y , string $c , int $color )

imagecharup() 将字符 c 垂直地画在 image 指定的图像上,位于 xy(图像左上角为 0, 0),颜色为 color。如果 font 为 1,2,3,4 或 5,则使用内置的字体。

Example #1 imagecharup() 例子

<?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);

// prints a black "Z" on a white background
imagecharup($im, 3, 10, 10, $string, $black);

header('Content-type: image/png');
imagepng($im);

?>

参见 imagechar() 和 imageloadfont()。


!!!站长长期在线接!!!

网站、小程序:定制开发/二次开发/仿制开发等

各种疑难杂症解决/定制接口/定制采集等

站长微信:lxwl520520

站长QQ:1737366103