public function save($path, $format = null, $quality = null)
{
if (null !== $quality) {
//set quality of the image
$this->addConvertOption('quality', $quality);
}
$format = null === $format || $this->getForceAlpha() || $format == 'png' ? 'png32' : null;
recursiveCopy($this->imagePath, $path);
if (null !== $format) {
//set the image format. see: http://www.imagemagick.org/script/formats.php
$path = strtoupper($format) . ':' . $path;
}
$command = $this->getConvertCommand() . $path;
$this->processCommand($command);
$this->convertCommandOptions = [];
$this->convertFilters = [];
return $this;
}