Пример #1
0
 /**
  * Class constructor.
  *
  * @param   mixed  $source  Either a file path for a source image or a GD resource handler for an image.
  *
  * @since   11.3
  * @throws  RuntimeException
  */
 public function __construct($source = null)
 {
     // Determine which image types are supported by GD, but only once.
     if (!isset(self::$formats[IMAGETYPE_JPEG])) {
         $info = gd_info();
         self::$formats[IMAGETYPE_JPEG] = $info['JPEG Support'] ? true : $info['JPG Support'] ? true : false;
         self::$formats[IMAGETYPE_PNG] = $info['PNG Support'] ? true : false;
         self::$formats[IMAGETYPE_GIF] = $info['GIF Read Support'] ? true : false;
     }
     parent::__construct($source);
 }
Пример #2
0
 /**
  * Class constructor.
  *
  * @param   mixed  $source  Either a file path for a source image or a GD resource handler for an image.
  *
  * @since   11.3
  * @throws  RuntimeException
  */
 public function __construct($source = null)
 {
     parent::__construct($source);
 }