public function ImagemagickExecArguments::setSourceFormatFromExtension in ImageMagick 8.2
Same name and namespace in other branches
- 8.3 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 464
Class
- ImagemagickExecArguments
- Stores arguments for execution of ImageMagick/GraphicsMagick commands.
Namespace
Drupal\imagemagickCode
public function setSourceFormatFromExtension($extension) {
$this->sourceFormat = $this->execManager
->getFormatMapper()
->getFormatFromExtension($extension) ?: '';
return $this;
}