You are here

public function ImagemagickToolkit::getMimeType in ImageMagick 8

Same name and namespace in other branches
  1. 8.3 src/Plugin/ImageToolkit/ImagemagickToolkit.php \Drupal\imagemagick\Plugin\ImageToolkit\ImagemagickToolkit::getMimeType()
  2. 8.2 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

2 calls to ImagemagickToolkit::getMimeType()
ImagemagickToolkit::isValid in src/Plugin/ImageToolkit/ImagemagickToolkit.php
Checks if the image is valid.
ImagemagickToolkit::parseExifData in src/Plugin/ImageToolkit/ImagemagickToolkit.php
Parses the image file EXIF data using the PHP read_exif_data() function.

File

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

Class

ImagemagickToolkit
Provides ImageMagick integration toolkit for image manipulation.

Namespace

Drupal\imagemagick\Plugin\ImageToolkit

Code

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