public function ImagemagickExecArguments::setSourceFormatFromExtension in ImageMagick 8.3
Same name and namespace in other branches
- 8.2 src/ImagemagickExecArguments.php \Drupal\imagemagick\ImagemagickExecArguments::setSourceFormatFromExtension()
Sets the source image format from an image file extension.
Parameters
string $extension: The image file extension.
Return value
$this
File
- src/
ImagemagickExecArguments.php, line 292
Class
- ImagemagickExecArguments
- Stores arguments for execution of ImageMagick/GraphicsMagick commands.
Namespace
Drupal\imagemagickCode
public function setSourceFormatFromExtension(string $extension) : ImagemagickExecArguments {
$this->sourceFormat = $this->execManager
->getFormatMapper()
->getFormatFromExtension($extension) ?: '';
return $this;
}