png2wbmp
(PHP 4 >= 4.0.5, PHP 5, PHP 7)
png2wbmp — 将 PNG 图像文件转换为 WBMP 图像文件
警告
本函数已自 PHP 7.2.0 起被废弃,并自 PHP 8.0.0 起被移除。 强烈建议不要依赖本函数。
说明
png2wbmp(
string
string
int
int
int
): bool
string
$pngname
,string
$wbmpname
,int
$dest_height
,int
$dest_width
,int
$threshold
): bool
转换 PNG 文件到 WBMP 文件。
参数
pngname
-
PNG 文件的路径。
wbmpname
-
目标 WBMP 文件的路径。
dest_height
-
目标图像的高度。
dest_width
-
目标图像的宽度。
threshold
-
阈值,在 0 到 8 之间(含)。
示例
示例 #1 png2wbmp() 示例
<?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);
?>
参见
- jpeg2wbmp() - 将 JPEG 图像文件转换为 WBMP 图像文件
+添加备注
用户贡献的备注 1 note
Window Bump Map ¶
16 years ago
WBMP is NOT windows bitmap, it is wireless bitmap. just to state that nice and clearly.