public function ImagemagickToolkit::setSourceFormatFromExtension in ImageMagick 8
Same name and namespace in other branches
- 8.2 src/Plugin/ImageToolkit/ImagemagickToolkit.php \Drupal\imagemagick\Plugin\ImageToolkit\ImagemagickToolkit::setSourceFormatFromExtension()
Sets the source image format from an image file extension.
Parameters
string $extension: The image file extension.
Return value
$this
File
- src/
Plugin/ ImageToolkit/ ImagemagickToolkit.php, line 599
Class
- ImagemagickToolkit
- Provides ImageMagick integration toolkit for image manipulation.
Namespace
Drupal\imagemagick\Plugin\ImageToolkitCode
public function setSourceFormatFromExtension($extension) {
$format = $this->formatMapper
->getFormatFromExtension($extension);
$this->sourceFormat = $format ?: '';
return $this;
}