png2wbmp

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

png2wbmp — PNG画像をWBMP画像に変換する

警告

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

説明

function png2wbmp(
    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までの値を指定します。

戻り値

成功した場合に true を、失敗した場合に false を返します。

警告

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

例

例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);
?>

参考

User Contributed Notes 1 note

up
0
Window Bump Map
18 years ago
WBMP is NOT windows bitmap, it is wireless bitmap. just to state that nice and clearly.
Adding new notes is disabled. Please see the links in the Found A Problem? section.
To Top