PNG画像をWBMP画像に変換する
この関数は PHP 7.2.0 で 非推奨 になり、PHP 8.0.0 で 削除 されました。この関数に頼らないことを強く推奨します。
$pngname
$wbmpname
$dest_height
$dest_width
$threshold
PNG画像をWBMP画像に変換します。
pngname
PNG画像ファイル
wbmpname
出力先のWBMPファイルのパス
dest_height
出力画像の高さ
dest_width
出力画像の幅
threshold
しきい値の値。0から8までの値を指定します。
成功した場合に true を、失敗した場合に false を返します。
true
false
しかしながら、libgd がイメージの出力に失敗した場合、この関数は true を返します。
例1 png2wbmp の例
<?php// Path to the target png$path = './test.png';// Get the image sizes$image = getimagesize($path);// Convert imagepng2wbmp($path, './test.wbmp', $image[1], $image[0], 7);?>