找到关于编程的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 合并,其范围可以从 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、5;x: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.