private function cropImage(MediaInterface $media, AliasManipulator $aliasManipulator)
    {
        $aliasName = $aliasManipulator->getAliasName();
        $aliasArray = $aliasManipulator->getAliasArray();
        $mediaPath = $aliasName.'/'.$media->getReference();

        if ($this->filesystemManipulator->has($mediaPath)) {
            return true;
        }

        $mediaOriginalPath = $this->originalDir.'/'.$media->getReference();

        if (!$this->filesystemManipulator->has($mediaOriginalPath)) {
            throw new \Exception('The file \''.$mediaOriginalPath.'\' is not found.');
        }

        if ($aliasArray['focus'] === true) {
            $magicFocus = new Focus($this, $media);
            $magicFocus
                ->setTargetSize($aliasArray['width'], $aliasArray['height'])
                ->setFocus($media->getFocusLeft(), $media->getFocusTop())
                ->apply($aliasName)
                ;

            return true;
        }

        $resize = new Resize($this, $media);
        $resize
            ->setTargetSize($aliasArray['width'], $aliasArray['height'])
            ->apply($aliasName)
            ;

        return true;
    }