imagecolorexactalpha()
取得指定的颜色加透明度的索引值
适用PHP版本(PHP 4 >= 4.0.6, PHP 5, PHP 7, PHP 8) 说明 imagecolorexactalpha( GdImage $image, int $red, int $green, int $blue, int $alpha ): int 返…
收录 8868 个 PHP 函数,含用途说明与用法示例。
本地收录 8868 条,找到 8868 条记录
取得指定的颜色加透明度的索引值
适用PHP版本(PHP 4 >= 4.0.6, PHP 5, PHP 7, PHP 8) 说明 imagecolorexactalpha( GdImage $image, int $red, int $green, int $blue, int $alpha ): int 返…
将图像以 JPEG 格式输出或保存到文件
函数名:imagejpeg() 适用版本:PHP 4, PHP 5, PHP 7 用法:imagejpeg() 函数用于将图像以 JPEG 格式输出或保存到文件。 语法:bool imagejpeg ( resource $image [, mixed $to [, int…
检查图像是否为真彩色图像
函数名:imageistruecolor() 适用版本:PHP 4 >= 4.3.2, PHP 5, PHP 7 函数描述:imageistruecolor() 函数用于检查图像是否为真彩色图像。 用法: bool imageistruecolor ( resource $…
设置图像的隔行扫描模式,即是否启用隔行扫描
函数名:imageinterlace() 适用版本:PHP 4, PHP 5, PHP 7 用法:imageinterlace() 函数用于设置图像的隔行扫描模式,即是否启用隔行扫描。启用隔行扫描可以逐渐加载图像,提高用户体验。 语法:bool imageinterlace…
从指定的窗口抓取屏幕上的图像,并返回一个图像资源
函数名称:imagegrabwindow() 适用版本:PHP 5 >= 5.2.2, PHP 7, PHP 8 函数描述:imagegrabwindow() 函数用于从指定的窗口抓取屏幕上的图像,并返回一个图像资源。 用法: resource imagegrabwind…
获取屏幕的截图,并返回一个图像资源
函数名:imagegrabscreen() 适用版本:该函数仅在 Windows 平台上可用,并且需要安装 GDI32 DLL 扩展。 用法:imagegrabscreen() 函数用于获取屏幕的截图,并返回一个图像资源。 示例: // 创建一个图像资源,用于存储屏幕截图…
将图像以 GIF 格式输出或保存至文件
函数名称:imagegif() 适用版本:PHP 4, PHP 5, PHP 7 函数描述:imagegif() 用于将图像以 GIF 格式输出或保存至文件。 语法:bool imagegif ( resource $image [, string $filename ] …
在图像上使用 TrueType 字体绘制文本
函数名:imagefttext() 适用版本:PHP 4 >= 4.0.7, PHP 5, PHP 7 用法:imagefttext() 函数在图像上使用 TrueType 字体绘制文本。它返回一个布尔值,表示文本是否成功绘制到图像上。 语法:bool imagefttex…
获取指定字体的字符宽度
函数名:imagefontwidth() 适用版本:PHP 4, PHP 5, PHP 7 用法:imagefontwidth() 函数用于获取指定字体的字符宽度。它返回一个整数,表示字体中每个字符的宽度。 语法:int imagefontwidth ( int $font…
获取指定字体的高度
函数名称:imagefontheight() 函数描述:该函数用于获取指定字体的高度。 参数:无 返回值:返回指定字体的高度,单位为像素。 适用版本:该函数适用于所有PHP版本。 示例: // 创建一个画布 $image = imagecreatetruecolor(…
水平或垂直翻转图像
函数名:imageflip() 适用版本:PHP 5 >= 5.5.0, PHP 7 函数描述:imageflip() 函数用于水平或垂直翻转图像。 用法: bool imageflip ( resource $image , int $mode ) 参数说明: $im…
在图像中填充边界相同颜色的区域
函数名:imagefilltoborder() 适用版本:PHP 4, PHP 5, PHP 7 用法:imagefilltoborder() 函数用于在图像中填充边界相同颜色的区域。该函数会从指定的起始点开始,沿着边界向外填充,直到遇到与边界颜色不同的像素为止。 语法:b…
在图像上绘制一个填充的矩形
函数名称:imagefilledrectangle() 函数描述:该函数用于在图像上绘制一个填充的矩形。 用法: imagefilledrectangle ( resource $image , int $x1 , int $y1 , int $x2 , int $y2 , …
在图像上绘制填充的椭圆
函数名称:imagefilledellipse() 函数描述:该函数用于在图像上绘制填充的椭圆。 适用版本:PHP 4, PHP 5, PHP 7 语法:bool imagefilledellipse ( resource $image , int $cx , int $c…
绘制一个填充的椭圆弧
函数名:imagefilledarc() 适用版本:PHP 4 >= 4.0.6, PHP 5, PHP 7 用法:imagefilledarc() 函数用于绘制一个填充的椭圆弧。 语法:bool imagefilledarc ( resource $image , int…
在图像中填充颜色
函数名:imagefill() 函数描述:imagefill() 函数用于在图像中填充颜色。 适用版本:该函数适用于 PHP 4、PHP 5、PHP 7。 语法:bool imagefill(resource $image, int $x, int $y, int $col…
在图像上绘制一个椭圆
函数名:imageellipse() 适用版本:PHP 4, PHP 5, PHP 7 用法:imageellipse() 函数用于在图像上绘制一个椭圆。 语法:bool imageellipse ( resource $image , int $cx , int $cy …
销毁一个由 imagecreate() 或 imagecreatetruecolor() 创建的图像资源,以释放内存
函数名:imagedestroy() 适用版本:所有版本的 PHP 用法:imagedestroy() 函数用于销毁一个由 imagecreate() 或 imagecreatetruecolor() 创建的图像资源,以释放内存。 语法:bool imagedestroy …
在图像资源中绘制一条虚线
函数名:imagedashedline() 适用版本:PHP 4, PHP 5, PHP 7 用法:imagedashedline() 函数用于在图像资源中绘制一条虚线。 语法:bool imagedashedline ( resource $image , int $x1…
从 XPM 文件创建一个新的图像资源
函数名:imagecreatefromxpm() 函数描述:该函数用于从 XPM 文件创建一个新的图像资源。 适用版本:PHP 4, PHP 5, PHP 7 语法:imagecreatefromxpm(string $filename) 参数: $filename: …
从指定的 XBM 文件创建一个新的图像资源
函数名称:imagecreatefromxbm() 适用版本:PHP 4, PHP 5, PHP 7 函数描述:imagecreatefromxbm() 函数从指定的 XBM 文件创建一个新的图像资源。 用法: resource imagecreatefromxbm ( …
从 WebP 图像文件创建一个新的图像资源
函数名:imagecreatefromwebp() 适用版本:PHP 5 >= 5.4.0, PHP 7, PHP 8 用法:imagecreatefromwebp() 函数用于从 WebP 图像文件创建一个新的图像资源。 语法:imagecreatefromwebp(st…
将图像以 GD 1.x 格式保存到指定的文件或浏览器
函数名:imagegd() 适用版本:PHP 4、PHP 5、PHP 7 函数描述: imagegd() 函数将图像以 GD 1.x 格式保存到指定的文件或浏览器。 语法: bool imagegd ( resource $image [, mixed $to [, int…
对图像进行伽马校正
函数名称:imagegammacorrect() 适用版本:PHP 4 >= 4.0.6, PHP 5, PHP 7 用法:imagegammacorrect() 函数用于对图像进行伽马校正。它可以调整图像的亮度和对比度,以改善图像的显示效果。 语法:bool imageg…