public function ImagemagickExecArguments::setDestinationFormatFromExtension in ImageMagick 8.2
Same name and namespace in other branches
- 8.3 src/ImagemagickExecArguments.php \Drupal\imagemagick\ImagemagickExecArguments::setDestinationFormatFromExtension()
Sets the image destination format from an image file extension.
When set, it is passed to the convert binary in the syntax "[format]:[destination]", where [format] is a string denoting an ImageMagick's image format.
Parameters
string $extension: The destination image file extension.
Return value
$this
File
- src/
ImagemagickExecArguments.php, line 581
Class
- ImagemagickExecArguments
- Stores arguments for execution of ImageMagick/GraphicsMagick commands.
Namespace
Drupal\imagemagickCode
public function setDestinationFormatFromExtension($extension) {
$this->destinationFormat = $this->execManager
->getFormatMapper()
->getFormatFromExtension($extension) ?: '';
return $this;
}