public function ImagemagickToolkit::parseFile in ImageMagick 8.2
Same name and namespace in other branches
- 8.3 src/Plugin/ImageToolkit/ImagemagickToolkit.php \Drupal\imagemagick\Plugin\ImageToolkit\ImagemagickToolkit::parseFile()
- 8 src/Plugin/ImageToolkit/ImagemagickToolkit.php \Drupal\imagemagick\Plugin\ImageToolkit\ImagemagickToolkit::parseFile()
Determines if a file contains a valid image.
Drupal supports GIF, JPG and PNG file formats when used with the GD toolkit, and may support others, depending on which toolkits are installed.
Return value
bool TRUE if the file could be found and is an image, FALSE otherwise.
Overrides ImageToolkitInterface::parseFile
File
- src/
Plugin/ ImageToolkit/ ImagemagickToolkit.php, line 1219
Class
- ImagemagickToolkit
- Provides ImageMagick integration toolkit for image manipulation.
Namespace
Drupal\imagemagick\Plugin\ImageToolkitCode
public function parseFile() {
if ($this->configFactory
->get('imagemagick.settings')
->get('use_identify')) {
return $this
->parseFileViaIdentify();
}
else {
return $this
->parseFileViaGetImageSize();
}
}