= 4.0.5, PHP 5, PHP 7)jpeg2wbmp — 將 JPEG 圖像文件轉(zhuǎn)換為 WBMP 圖像文件說(shuō)明jpeg2wbmp( string $jpegname, string $wbmpname, int $dest_height,">

jpeg2wbmp

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

jpeg2wbmp將 JPEG 圖像文件轉(zhuǎn)換為 WBMP 圖像文件

說(shuō)明

jpeg2wbmp(
    string $jpegname,
    string $wbmpname,
    int $dest_height,
    int $dest_width,
    int $threshold
): bool

將 JPEG 圖像文件轉(zhuǎn)換為 WBMP 圖像文件。

參數(shù)

jpegname

JPEG 文件的路徑。

wbmpname

目標(biāo) WBMP 文件的路徑。

dest_height

目標(biāo)圖像高度。

dest_width

目標(biāo)圖像寬度。

threshold

閾值,在 0 和 8 之間(含)。

返回值

成功時(shí)返回 true, 或者在失敗時(shí)返回 false。

范例

示例 #1 jpeg2wbmp() 例子

<?php
// 目標(biāo) jpeg 的路徑
$path './test.jpg';

// 獲取圖像尺寸
$image getimagesize($path);

// 轉(zhuǎn)換圖像
jpeg2wbmp($path'./test.wbmp'$image[1], $image[0], 5);
?>

注釋

參見(jiàn)

  • png2wbmp() - 將 PNG 圖像文件轉(zhuǎn)換為 WBMP 圖像文件