略微加速

PHP官方手册 - 互联网笔记

PHP - Manual: png2wbmp

2024-04-28

png2wbmp

(PHP 4 >= 4.0.5, PHP 5, PHP 7)

png2wbmp将 PNG 图像文件转换为 WBMP 图像文件

说明

png2wbmp(
    string $pngname,
    string $wbmpname,
    int $dest_height,
    int $dest_width,
    int $threshold
): bool

将名为 pngname 的 PNG 文件转换为 WBMP 格式,并存为 wbmpname。用 d_heightd_width 指定目标图像的高度和宽度。

参数

pngname

PNG 文件的路径。

wbmpname

目标 WBMP 文件的路径。

dest_height

目标图像的高度。

dest_width

目标图像的宽度。

threshold

阈值,在 0 到 8 之间(含)。

返回值

成功时返回 true, 或者在失败时返回 false

范例

示例 #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 图像文件
add a noteadd a note

User Contributed Notes 1 note

up
0
Window Bump Map
13 years ago
WBMP is NOT windows bitmap, it is wireless bitmap. just to state that nice and clearly.

官方地址:https://www.php.net/manual/en/function.png2wbmp.php

北京半月雨文化科技有限公司.版权所有 京ICP备12026184号-3