Just thought I'd add how I used the gamma correction function (seeing as no-one had done so previously). works great.
I used a form which has a parameter $GAMMA, so I usually type in something like 1.6
$image = ImageCreateFromJpeg ( "pictures/".$PICTURE2 ) ;
if ($GAMMA != "")
{
$GammaFloat = (double) $GAMMA ;
imagegammacorrect ($image, 1.0, $GammaFloat ) ;
// now save the file
imagejpeg ( $image, "pictures/"."$PICTURE2", 90 ) ;
}
imagegammacorrect
(PHP 4, PHP 5)
imagegammacorrect — GD イメージにガンマ補正を適用する
説明
bool imagegammacorrect
( resource $image
, float $inputgamma
, float $outputgamma
)
指定した GD 画像 image に 入力ガンマ値、出力ガンマ値を指定してガンマ補正を適用します。
返り値
成功した場合に 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);
?>
imagegammacorrect
brian dot duncan at fife dot co dot uk
26-Jan-2002 01:46
26-Jan-2002 01:46
