示例#1
0
 /**
  * @param  LayerInterface[] $layers
  * @param  mixed[]          $options
  * @return Image
  */
 public function createImage(array $layers, array $options)
 {
     $this->initContents($layers, $options);
     $contents = $layers[0]->get('final.contents');
     $image = new Image();
     $image->setContents($contents);
     return $image;
 }
示例#2
0
 /**
  * @param  LayerInterface[] $layers
  * @param  mixed[]          $options
  * @return Image
  */
 public function createImage(array $layers, array $options)
 {
     $this->initContents($layers);
     $contents = $layers[0]->get('gif.contents');
     $extracted = $layers[0]->get('gif.extracted');
     $frames = count($extracted);
     $image = new Image();
     $image->setContents($contents);
     $image->addExtras(['total_frames' => $frames]);
     return $image;
 }