PHP 8.3.4 Released!

jpeg2wbmp

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

jpeg2wbmpJPEG画像をWBMP画像に変換する

警告

この関数は PHP 7.2.0 で 非推奨 になり、PHP 8.0.0 で 削除 されました。この関数に頼らないことを強く推奨します。

説明

jpeg2wbmp(
    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 を返します。

警告

しかしながら、libgd がイメージの出力に失敗した場合、この関数は true を返します。

例1 jpeg2wbmp() の例

<?php
// Path to the target jpeg
$path = './test.jpg';

// Get the image sizes
$image = getimagesize($path);

// Convert image
jpeg2wbmp($path, './test.wbmp', $image[1], $image[0], 5);
?>

参考

  • png2wbmp() - PNG画像をWBMP画像に変換する
add a note

User Contributed Notes 1 note

up
-8
barry dot schatz at gmail dot com
14 years ago
Actually this produces black and white images only, as does the jpeg2wbmp function.
To Top