GD and Image 函数
PHP Manual

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_heightd_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 或更高版本一起编译时可用.

参见


GD and Image 函数
PHP Manual