Source for file smooth.php

Documentation is available at smooth.php

  1. <?php
  2. /**
  3.  * @package     Joomla.Platform
  4.  * @subpackage  Image
  5.  *
  6.  * @copyright   Copyright (C) 2005 - 2013 Open Source Matters, Inc. All rights reserved.
  7.  * @license     GNU General Public License version 2 or later; see LICENSE
  8.  */
  9.  
  10. defined('JPATH_PLATFORM'or die;
  11.  
  12. /**
  13.  * Image Filter class adjust the smoothness of an image.
  14.  *
  15.  * @package     Joomla.Platform
  16.  * @subpackage  Image
  17.  * @since       11.3
  18.  */
  19. {
  20.     /**
  21.      * Method to apply a filter to an image resource.
  22.      *
  23.      * @param   array  $options  An array of options for the filter.
  24.      *
  25.      * @return  void 
  26.      *
  27.      * @since   11.3
  28.      * @throws  InvalidArgumentException
  29.      */
  30.     public function execute(array $options array())
  31.     {
  32.         // Validate that the smoothing value exists and is an integer.
  33.         if (!isset($options[IMG_FILTER_SMOOTH]|| !is_int($options[IMG_FILTER_SMOOTH]))
  34.         {
  35.             throw new InvalidArgumentException('No valid smoothing value was given.  Expected integer.');
  36.         }
  37.  
  38.         // Perform the smoothing filter.
  39.         imagefilter($this->handleIMG_FILTER_SMOOTH$options[IMG_FILTER_SMOOTH]);
  40.     }
  41. }

Documentation generated on Tue, 19 Nov 2013 15:13:57 +0100 by phpDocumentor 1.4.3