Php/docs/function.imagegammacorrect

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

imagegammacorrect

(PHP 4, PHP 5, PHP 7)

imagegammacorrectGD イメージにガンマ補正を適用する


説明

imagegammacorrect ( resource $image , float $inputgamma , float $outputgamma ) : bool

指定した GD 画像 image に 入力ガンマ値、出力ガンマ値を指定してガンマ補正を適用します。


パラメータ

image
imagecreatetruecolor() のような画像作成関数が返す画像リソース。
inputgamma
入力ガンマ値。
outputgamma
出力ガンマ値。


返り値

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


例1 imagegammacorrect() の使用法

<?php// 画像のインスタンスを作成します$im = imagecreatefromgif('php.gif');// ガンマ補正を out = 1.537 で行いますimagegammacorrect($im, 1.0, 1.537);// 出力してメモリから解放しますimagegif($im, './php_gamma_corrected.gif');imagedestroy($im);?>