PHP
downloads | documentation | faq | getting help | mailing lists | reporting bugs | php.net sites | links | conferences | my php.net

search for in the

imagecolordeallocate> <imagecolorclosestalpha
Last updated: Fri, 03 Oct 2008

view this page in

imagecolorclosesthwb

(PHP 4 >= 4.0.1, PHP 5)

imagecolorclosesthwb色合い、白、黒を有する色のインデックスを得る

説明

int imagecolorclosesthwb ( resource $image , int $red , int $green , int $blue )

指定した色に最も近い色合い、白、黒を有する色のインデックスを取得します。

パラメータ

image

imagecreatetruecolor() のような画像作成関数が返す画像リソース。

red

赤コンポーネントの値。

green

緑コンポーネントの値。

blue

青コンポーネントの値。

返り値

指定した色に最も近い色合い、白、黒を有する色のインデックスを返します。

例1 imagecolorclosesthwb() の使用例

<?php
$im 
imagecreatefromgif('php.gif');

echo 
'HWB: ' imagecolorclosesthwb($im116115152);

imagedestroy($im);
?>

上の例の出力は、たとえば 以下のようになります。

HWB: 33

変更履歴

バージョン 説明
5.3.0 この関数は Windows でも使用可能となりました。



add a note add a note User Contributed Notes
imagecolorclosesthwb
There are no user contributed notes for this page.

imagecolordeallocate> <imagecolorclosestalpha
Last updated: Fri, 03 Oct 2008
 
 
show source | credits | sitemap | contact | advertising | mirror sites