jpeg2wbmp
(PHP 4 >= 4.0.5, PHP 5, PHP 7)
jpeg2wbmp — 将 JPEG 图像文件转换为 WBMP 图像文件
说明
jpeg2wbmp(
string
string
int
int
int
): bool
string
$jpegname
,string
$wbmpname
,int
$dest_height
,int
$dest_width
,int
$threshold
): bool
将 JPEG 图像文件转换为 WBMP 图像文件。
参数
-
jpegname
-
JPEG 文件的路径。
-
wbmpname
-
目标 WBMP 文件的路径。
-
dest_height
-
目标图像高度。
-
dest_width
-
目标图像宽度。
-
threshold
-
阈值,在 0 和 8 之间(含)。
返回值
成功时返回 true
, 或者在失败时返回 false
。
范例
示例 #1 jpeg2wbmp() 例子
<?php
// 目标 jpeg 的路径
$path = './test.jpg';
// 获取图像尺寸
$image = getimagesize($path);
// 转换图像
jpeg2wbmp($path, './test.wbmp', $image[1], $image[0], 5);
?>
注释

User Contributed Notes 1 note
barry dot schatz at gmail dot com ¶
13 years ago
Actually this produces black and white images only, as does the jpeg2wbmp function.