jpeg2wbmp
(PHP 4 >= 4.0.5, PHP 5, PHP 7)
jpeg2wbmp — 將 JPEG 影象檔案轉換為 WBMP 影象檔案
說明
jpeg2wbmp(
string
string
int
int
int
): bool
string
$jpegname,string
$wbmpname,int
$dest_height,int
$dest_width,int
$threshold): bool
將 JPEG 影象檔案轉換為 WBMP 影象檔案。
參數
-
jpegname JPEG 檔案的路徑。
-
wbmpname 目標 WBMP 檔案的路徑。
-
dest_height 目標影象高度。
-
dest_width 目標影象寬度。
-
threshold 閾值,在 0 和 8 之間(含)。
返回值
成功時返回 true, 或者在失敗時返回 false。
範例
示例 #1 jpeg2wbmp() 例子
<?php
// 目標 jpeg 的路徑
$path = './test.jpg';
// 獲取影象尺寸
$image = getimagesize($path);
// 轉換影象
jpeg2wbmp($path, './test.wbmp', $image[1], $image[0], 5);
?> 註釋
參見
- png2wbmp() - 將 PNG 影象檔案轉換為 WBMP 影象檔案