array ( 0 => 'index.php', 1 => 'PHP Manual', ), 'head' => array ( 0 => 'UTF-8', 1 => 'ja', ), 'this' => array ( 0 => 'function.png2wbmp.php', 1 => 'png2wbmp', ), 'up' => array ( 0 => 'ref.image.php', 1 => 'GD および Image 関数', ), 'prev' => array ( 0 => 'function.jpeg2wbmp.php', 1 => 'jpeg2wbmp', ), 'next' => array ( 0 => 'class.gdimage.php', 1 => 'GdImage', ), 'alternatives' => array ( ), 'source' => array ( 'lang' => 'ja', 'path' => 'reference/image/functions/png2wbmp.xml', ), ); $setup["toc"] = $TOC; $setup["toc_deprecated"] = $TOC_DEPRECATED; $setup["parents"] = $PARENTS; manual_setup($setup); ?>
(PHP 4 >= 4.0.5, PHP 5, PHP 7)
png2wbmp — 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までの値を指定します。
例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);
?>