位置: 编程技术 - 正文

PHP:imagestring()的用法_GD库图像处理函数(php image)

编辑:rootadmin
imagestring

推荐整理分享PHP:imagestring()的用法_GD库图像处理函数(php image),希望有所帮助,仅作参考,欢迎阅读内容。

文章相关热门搜索词:php extract,php img src,php img src,php imgick,php image,php img src,php imagefill,php imagestring,内容如对您有帮助,希望把文章链接给更多的朋友!

(PHP 4, PHP 5)

imagestring — 水平地画一行字符串

说明 bool imagestring ( resource $image , int $font , int $x , int $y , string $s , int $col ) PHP:imagestring()的用法_GD库图像处理函数(php image)

imagestring() 用 col 颜色将字符串 s 画到 image 所代表的图像的 x,y 坐标处(这是字符串左上角坐标,整幅图像的左上角为 0,0)。如果 font 是 1,2,3,4 或 5,则使用内置字体。

Example #1 imagestring() 例子

<?php//建立一幅X的图像$im=imagecreate(,);//白色背景和蓝色文本$bg=imagecolorallocate($im,,,);$textcolor=imagecolorallocate($im,0,0,);//把字符串写在图像左上角imagestring($im,5,0,0,"Helloworld!",$textcolor);//输出图像header("Content-type:image/png");imagepng($im);?>

参见 imageloadfont() 和 imagettftext()。

PHP:imagesy()的用法_GD库图像处理函数 imagesy(PHP4,PHP5)imagesy取得图像高度说明intimagesy(resource$image)imagesy()返回image所代表的图像的高度。Example#1使用imagesy()?php//createa*image$img=imagecreatetruecolor(

PHP:imagetruecolortopalette()的用法_GD库图像处理函数 imagetruecolortopalette(PHP4=4.0.6,PHP5)imagetruecolortopalette将真彩色图像转换为调色板图像说明boolimagetruecolortopalette(resource$image,bool$dither,int$ncolors)imagetruecolortopalett

PHP:imagesx()的用法_GD库图像处理函数 imagesx(PHP4,PHP5)imagesx取得图像宽度说明intimagesx(resource$image)imagesx()返回image所代表的图像的宽度。Example#1使用imagesx()?php//createa*image$img=imagecreatetruecolor(

本文链接地址:https://www.jiuchutong.com/biancheng/284742.html 转载请保留说明!

上一篇:PHP:imagetypes()的用法_GD库图像处理函数

下一篇:PHP:imagesy()的用法_GD库图像处理函数(php imagick)

免责声明:网站部分图片文字素材来源于网络,如有侵权,请及时告知,我们会第一时间删除,谢谢! 邮箱:opceo@qq.com

鄂ICP备2023003026号

网站地图: 企业信息 工商信息 财税知识 网络常识 编程技术

友情链接: 武汉网站建设 电脑维修 湖南楚通运网络