You are here

public function ImagemagickToolkit::getMimeType in ImageMagick 8.2

Same name and namespace in other branches
  1. 8.3 src/Plugin/ImageToolkit/ImagemagickToolkit.php \Drupal\imagemagick\Plugin\ImageToolkit\ImagemagickToolkit::getMimeType()
  2. 8 src/Plugin/ImageToolkit/ImagemagickToolkit.php \Drupal\imagemagick\Plugin\ImageToolkit\ImagemagickToolkit::getMimeType()

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

1 call to ImagemagickToolkit::getMimeType()
ImagemagickToolkit::isValid in src/Plugin/ImageToolkit/ImagemagickToolkit.php
Checks if the image is valid.

File

src/Plugin/ImageToolkit/ImagemagickToolkit.php, line 1025

Class

ImagemagickToolkit
Provides ImageMagick integration toolkit for image manipulation.

Namespace

Drupal\imagemagick\Plugin\ImageToolkit

Code

public function getMimeType() {
  return $this->formatMapper
    ->getMimeTypeFromFormat($this
    ->arguments()
    ->getSourceFormat());
}