Esempio n. 1
0
 /**
  * Runs [Magic::check] and loads the image.
  *
  * @return  void
  */
 public function __construct($file)
 {
     if (!Magic::$_checked) {
         // Run the install check
         Magic::check();
     }
     parent::__construct($file);
     $this->im = new Imagick();
     $this->im->readImage($file);
     if (!$this->im->getImageAlphaChannel()) {
         // Force the image to have an alpha channel
         $this->im->setImageAlphaChannel(Imagick::ALPHACHANNEL_SET);
     }
 }