* Images from CAMBRIDGE in COLOR
<?php
bool imagegammacorrect ( GdImage $image,
float $input_gamma,
float $output_gamma )
where,
$image = The image identifier
$input_gamma = The input gamma
$output_gamma = The output gamma
?>
<?php
echo 'PHP VERSION: ' . PHP_VERSION . '<br><br>';
$lang = 'en';
$org_file = "jpeg/JPEG 033 01.jpg";
$des_file = "jpeg/JPEG 033 01 imagegammacorrect.jpg";
$gamma_in = 2.0;
$gamma_out = 0.9;
echo basename($org_file); ?><br><br>
<img src="<?php echo $org_file; ?>"
alt="<?php echo $org_file; ?>"
title="<?php echo $org_file; ?>"><br><br>
<?php
$id_HS01 = imagecreatefromjpeg( $org_file);
$gamacorrectd =
imagegammacorrect($id_HS01, $gamma_in, $gamma_out);
if($gamacorrectd == true)
{
imagejpeg($id_HS01, $des_file);
echo '<br><br>' . basename($des_file); ?><br><br>
<img src="<?php echo $des_file; ?>"
alt="<?php echo $des_file; ?>"
title="<?php echo $des_file; ?>">
<?php
imagedestroy($id_HS01);
}
else
{
$en = 'GAMMA was not corrected!';
echo '' . $$lang . '';
}
?>