public function ImagemagickFormatMapper::isFormatEnabled in ImageMagick 8
Same name and namespace in other branches
- 8.3 src/ImagemagickFormatMapper.php \Drupal\imagemagick\ImagemagickFormatMapper::isFormatEnabled()
- 8.2 src/ImagemagickFormatMapper.php \Drupal\imagemagick\ImagemagickFormatMapper::isFormatEnabled()
Checks if an image format is enabled in the toolkit.
Parameters
string $format: An image format in ImageMagick's internal representation (e.g. JPEG, GIF87, etc.).
Return value
bool TRUE if the specified format is enabled within the toolkit, FALSE otherwise.
Overrides ImagemagickFormatMapperInterface::isFormatEnabled
1 call to ImagemagickFormatMapper::isFormatEnabled()
- ImagemagickFormatMapper::getMimeTypeFromFormat in src/
ImagemagickFormatMapper.php - Gets the MIME type of an image format.
File
- src/
ImagemagickFormatMapper.php, line 122
Class
- ImagemagickFormatMapper
- Provides the ImageMagick format mapper.
Namespace
Drupal\imagemagickCode
public function isFormatEnabled($format) {
$format = Unicode::strtoupper($format);
return $format ? isset($this
->resolveEnabledFormats()[$format]) : FALSE;
}