Example #1
0
 public function resize(PathableInterface $pathable, ResizeConfig $config)
 {
     $absoluteTargetPath = $this->pathResolver->resolveAbsoluteResizablePath($config, $pathable);
     if ($this->saver->has($absoluteTargetPath)) {
         return;
     }
     $imagine = ImagineFactory::createImagine($this->driver);
     $this->saver->checkPath($absoluteTargetPath);
     $imagine->open($this->pathResolver->resolveAbsolutePath($pathable))->thumbnail(new Box($config->getWidth(), $config->getHeight()), $config->getMode())->save($absoluteTargetPath);
 }
Example #2
0
 public function checkExist($path) : bool
 {
     return $this->saver->has($this->pathResolver->resolveAbsolutePath($path));
 }