Ejemplo n.º 1
0
 /**
  * Save The Alpha Channel Information For Png Resource
  *
  * @param Jaguar\Format\Png $png
  * @param boolean           $flag true to save false to ignore
  *
  * @return \Jaguar\Format\Png
  * @throws \Jaguar\Exception\CanvasException
  */
 protected function saveAlpha(Png $png, $flag)
 {
     if ($flag) {
         $png->alphaBlending(false);
         if (false == @imagesavealpha($png->getHandler(), $flag)) {
             throw new CanvasException(sprintf('Faild Saving The Alpha Channel Information To The Png Canvas "%s"', (string) $this));
         }
     }
     return $this;
 }
 /**
  * {@inheritdoc}
  */
 public function isSupported($file)
 {
     return Png::isPngFile($file);
 }