找到 34423 篇文章 关于 编程

PHP 中的 imagecopymerge() 函数

Chandu yadav
更新于 2019-12-31 07:41:39

675 次浏览

imagecopymerge() 函数复制并合并图像的一部分。语法imagecopymerge ( dst_img, src_img, dst_x, dst_y, src_x, src_y, src_w, src_h, pct )参数dst_im 设置目标图像链接资源。src_im 设置源图像链接资源。dst_x 设置目标点的 x 坐标。dst_y 设置目标点的 y 坐标。src_x 设置源点的 x 坐标。src_y 设置源点的 y 坐标。src_w 设置源宽度。src_h 设置源高度。pct 两张图像将根据 pct 合并,pct 的取值范围为 0 到 100。返回值imagecopymerge() 函数在成功时返回 TRUE,失败时返回 FALSE。示例以下是一个示例:输出以下是显示两张图像合并的输出:示例让我们看看 ... 阅读更多

PHP 中的 imagecharup() 函数

Ankith Reddy
更新于 2019-12-31 07:40:15

33 次浏览

imagecharup() 函数用于垂直绘制字符。语法imagecharup( img, font, x, y, c, color )参数img:使用 imagecreatetruecolor() 创建图像font:设置字体大小。对于 latin2 编码中的内置字体,它可以是 1、2、3、4、5x:x 坐标y:y 坐标c:要绘制的字符color:颜色标识符返回值imagecharup() 函数在成功时返回 TRUE,失败时返回 FALSE。示例以下是一个示例:输出以下是输出:示例让我们再看一个示例:输出以下是绘制字符 E 且具有不同尺寸的输出

PHP 中的 imagechar() 函数

Chandu yadav
更新于 2019-12-31 07:38:45

100 次浏览

imagechar() 函数水平绘制字符。语法bool imagechar( img, font, x, y, ch, color )参数img:使用 imagecreatetruecolor() 创建图像。font:设置字体大小x:x 坐标y:y 坐标ch:要绘制的字符。color:使用 imagecolorallocate() 创建的颜色标识符。返回值imagechar() 函数在成功时返回 TRUE,失败时返回 FALSE。示例以下是一个示例:输出以下是输出:示例让我们再看一个示例,其中我们使用不同的坐标和高度/宽度绘制字符,如上例所示:输出以下是输出

PHP 中的 imagearc() 函数

Arjun Thakur
更新于 2019-12-31 07:24:38

276 次浏览

imagearc() 函数用于绘制弧线。语法imagearc( $img, $cx, $cy, $width, $height, $start, $end, $color )参数$img:使用 imagecreatetruecolor() 创建图像。$cx:中心的 x 坐标。$cy:中心的 y 坐标。$width:弧线的宽度。$height:弧线的高度。$start:弧线的起始角度(度)。$end:弧线的结束角度(度)。$color:设置图像的颜色。返回值imagearc() 函数在成功时返回 TRUE,失败时返回 FALSE。示例以下是一个示例:输出以下是输出:示例让我们再看一个示例,其中弧线具有不同的坐标和角度:输出以下是输出:阅读更多

PHP 中的 imagecolorclosest() 函数

George John
更新于 2019-12-31 07:23:04

50 次浏览

imagecolorclosest() 函数获取最接近指定颜色的颜色的索引。语法imagecolorallocatealpha (img, red, green, blue)参数img:使用 imagecreatetruecolor() 创建的图像资源。red:红色分量green:绿色分量blue:蓝色分量返回值imagecolorclosest() 函数返回图像调色板中最接近的颜色索引。示例以下是一个示例:实时演示

PHP 中的 imagecolorallocatealpha() 函数

Ankith Reddy
更新于 2019-12-31 07:22:02

219 次浏览

imagecolorallocatealpha() 函数为图像分配颜色。语法imagecolorallocatealpha ( img, red, green, blue, alpha )参数img:使用 imagecreatetruecolor() 创建的图像资源。red:红色分量green:绿色分量blue:蓝色分量alpha:图像的透明度,其中 0 表示完全不透明,而 127 表示完全透明。返回值imagecolorallocatealpha() 函数返回颜色标识符,如果分配失败则返回 FALSE。示例以下是一个示例:输出以下是输出

PHP 中的 imagecolorallocate() 函数

Chandu yadav
更新于 2019-12-31 07:21:19

487 次浏览

imagecolorallocate() 函数为图像分配颜色。语法int imagecolorallocate ( $img, $red, $green, $blue )参数img:使用 imagecreatetruecolor() 创建的图像资源。red:红色分量green:绿色分量blue:蓝色分量返回值imagecolorallocate() 函数返回 RGB 格式的颜色。示例以下是一个示例:输出以下是输出

PHP 中的 imagecolorexact() 函数

Arjun Thakur
更新于 2019-12-31 07:20:41

53 次浏览

imagecolorexact() 函数获取指定颜色的索引。语法imagecolorexact ( $img, $red, $green, $blue )参数img:使用 imagecreatetruecolor() 创建的图像资源。red:红色分量green:绿色分量blue:蓝色分量返回值imagecolorexact() 函数返回调色板中指定颜色的索引,如果颜色不存在则返回 -1。示例以下是一个示例:实时演示输出以下是输出:Array ( [0] => 1989170 [1] => 5273700 [2] => 1658930 )

PHP 中的 imagecolorclosesthwb() 函数

George John
更新于 2019-12-31 07:20:04

33 次浏览

imagecolorclosesthwb() 函数获取具有色相、白色和黑色度的颜色的索引语法imagecolorclosesthwb ( $img, $red, $green, $blue )参数img:使用 imagecreatetruecolor() 创建图像red:红色分量green:绿色分量blue:蓝色分量返回值imagecolorclosesthwb() 函数返回一个整数,表示最接近给定颜色的色相、白色和黑色度颜色的索引。示例以下是一个示例:实时演示输出以下是输出:HWB = 87

PHP 中的 imagecolorclosestalpha() 函数

Ankith Reddy
更新于 2019-12-31 07:19:16

45 次浏览

imagecolorclosestalpha() 函数获取具有 Alpha 值的最接近颜色的索引。语法imagecolorclosestalpha ( img, red, green, blue, alpha )参数img:使用 imagecreatetruecolor() 创建的图像资源。red:红色分量green:绿色分量blue:蓝色分量alpha:图像的透明度,其中 0 表示完全不透明,而 127 表示完全透明。返回值imagecolorclosestalpha() 函数返回调色板中最接近的颜色索引。示例以下是一个示例:实时演示

广告

© . All rights reserved.