/** * @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; }
/** * @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; }