Php/docs/function.png2wbmp

提供:Dev Guides
< Php
移動先:案内検索

png2wbmp

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

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


警告 png2wbmp() 関数は PHP 7.2.0 以降では推奨されなくなり、 PHP 8.0.0 以降では削除される予定です。imagecreatefrompng()imagewbmp() を代わりに使ってください。


説明

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 imagepng2wbmp($path, './test.wbmp', $image[1], $image[0], 7);?>

参考