GammaCommand.php 478 B

123456789101112131415161718192021
  1. <?php
  2. namespace Intervention\Image\Gd\Commands;
  3. use Intervention\Image\Commands\AbstractCommand;
  4. class GammaCommand extends AbstractCommand
  5. {
  6. /**
  7. * Applies gamma correction to a given image
  8. *
  9. * @param \Intervention\Image\Image $image
  10. * @return boolean
  11. */
  12. public function execute($image)
  13. {
  14. $gamma = $this->argument(0)->type('numeric')->required()->value();
  15. return imagegammacorrect($image->getCore(), 1, $gamma);
  16. }
  17. }