Actually this produces black and white images only, as does the jpeg2wbmp function.
jpeg2wbmp
(PHP 4 >= 4.0.5, PHP 5)
jpeg2wbmp — 将 JPEG 图像文件转换为 WBMP 图像文件
说明
int jpeg2wbmp
( string
$jpegname
, string $wbmpname
, int $d_height
, int $d_width
, int $threshold
)
将名为 jpegname 的 JPEG 文件转换为
WBMP 格式,并存为 wbmpname。用
d_height 和 d_width
指定目标图像的高度和宽度。
Note: JPEG 支持仅在 PHP 与 GD-1.8 或更高版本一起编译时可用.
Note: WBMP 支持仅在 PHP 与 GD-1.8 或更高版本一起编译时可用.
参见 png2wbmp()。
参数
-
jpegname -
Path to JPEG file.
-
wbmpname -
Path to destination WBMP file.
-
dest_height -
Destination image height.
-
dest_width -
Destination image width.
-
threshold -
Threshold value, between 0 and 8 (inclusive).
返回值
成功时返回 TRUE, 或者在失败时返回 FALSE.
范例
Example #1 jpeg2wbmp() example
<?php
// Path to the target jpeg
$path = './test.jpg';
// Get the image sizes
$image = getimagesize($path);
// Convert image
jpeg2wbmp($path, './test.wbmp', $image[1], $image[0], 5);
?>
注释
Note: WBMP 支持仅在 PHP 与 GD-1.8 或更高版本一起编译时可用.
Note: JPEG 支持仅在 PHP 与 GD-1.8 或更高版本一起编译时可用.
barry dot schatz at gmail dot com
16-May-2009 08:41
