You are here

public function ImagemagickFormatMapperInterface::getFormatFromExtension in ImageMagick 8.2

Same name and namespace in other branches
  1. 8.3 src/ImagemagickFormatMapperInterface.php \Drupal\imagemagick\ImagemagickFormatMapperInterface::getFormatFromExtension()
  2. 8 src/ImagemagickFormatMapperInterface.php \Drupal\imagemagick\ImagemagickFormatMapperInterface::getFormatFromExtension()

Gets the image format, given the image file extension.

Parameters

string $extension: An image file extension (e.g. jpeg, jpg, png, etc.), without leading dot.

Return value

string|null The ImageMagick internal format (e.g. JPEG, GIF87, etc.) of the specified extension, if the format is enabled in the toolkit. NULL otherwise.

1 method overrides ImagemagickFormatMapperInterface::getFormatFromExtension()
ImagemagickFormatMapper::getFormatFromExtension in src/ImagemagickFormatMapper.php
Gets the image format, given the image file extension.

File

src/ImagemagickFormatMapperInterface.php, line 105

Class

ImagemagickFormatMapperInterface
Provides an interface for ImageMagick format mappers.

Namespace

Drupal\imagemagick

Code

public function getFormatFromExtension($extension);