You are here

public function ImagickToolkit::getMimeType in Imagick 8

Returns the MIME type of the image file.

Return value

string The MIME type of the image file, or an empty string if the image is invalid.

Overrides ImageToolkitInterface::getMimeType

File

src/Plugin/ImageToolkit/ImagickToolkit.php, line 224

Class

ImagickToolkit
Defines the Imagick toolkit for image manipulation within Drupal.

Namespace

Drupal\imagick\Plugin\ImageToolkit

Code

public function getMimeType() {
  if (!$this
    ->getResource()) {
    return NULL;
  }
  return $this
    ->getResource()
    ->getImageMimeType();
}