Example #1
0
 /**
  * Scales a given image according to the information passed as the second argument.
  *
  * @param ImageInterface $image
  * @param $scale
  *
  * @return ImageInterface
  */
 private function applyScale(ImageInterface $image, $scale)
 {
     return $this->modifyAllLayers($image, function (ImageInterface $layer) use($scale) {
         return $this->scaler->scale($layer, $scale['x'], $scale['y'], $scale['mode'], $scale['forceRatio'], $scale['retina']);
     });
 }