WBMP is NOT windows bitmap, it is wireless bitmap. just to state that nice and clearly.
png2wbmp
(PHP 4 >= 4.0.5, PHP 5)
png2wbmp — 将 PNG 图像文件转换为 WBMP 图像文件
说明
int png2wbmp
( string
$pngname
, string $wbmpname
, int $d_height
, int $d_width
, int $threshold
)
将名为 pngname 的 PNG 文件转换为
WBMP 格式,并存为 wbmpname。用
d_height 和 d_width
指定目标图像的高度和宽度。
Note: WBMP 支持仅在 PHP 与 GD-1.8 或更高版本一起编译时可用.
参见 jpeg2wbmp()。
参数
-
pngname -
Path to PNG 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 png2wbmp() example
<?php
// Path to the target png
$path = './test.png';
// Get the image sizes
$image = getimagesize($path);
// Convert image
png2wbmp($path, './test.wbmp', $image[1], $image[0], 7);
?>
注释
Note: WBMP 支持仅在 PHP 与 GD-1.8 或更高版本一起编译时可用.
Window Bump Map
30-Jun-2008 10:41
