Apply a gamma correction to a GD image in PHP
Description
The following code shows how to apply a gamma correction to a GD image.
Example
<?php//from w w w. ja v a 2s . co m
// Create image instance
$im = imagecreatefromgif('php.gif');
// Correct gamma, out = 1.537
imagegammacorrect($im, 1.0, 1.537);
// Save and free image
imagegif($im, './php_gamma_corrected.gif');
imagedestroy($im);
?>