function ImageToolkitInterface::getInfo

Gets details about an image.

Parameters

object $image: An image object.

Return value

array FALSE, if the file could not be found or is not an image. Otherwise, a keyed array containing information about the image:

  • "width": Width, in pixels.
  • "height": Height, in pixels.
  • "extension": Commonly used file extension for the image.
  • "mime_type": MIME type ('image/jpeg', 'image/gif', 'image/png').

See also

image_get_info()

2 methods override ImageToolkitInterface::getInfo()
GDToolkit::getInfo in drupal/core/modules/system/lib/Drupal/system/Plugin/ImageToolkit/GDToolkit.php
Implements \Drupal\system\Plugin\ImageToolkitInterface::getInfo().
TestToolkit::getInfo in drupal/core/modules/system/tests/modules/image_test/lib/Drupal/image_test/Plugin/ImageToolkit/TestToolkit.php
Implements \Drupal\system\Plugin\ImageToolkitInterface::getInfo().

File

drupal/core/modules/system/lib/Drupal/system/Plugin/ImageToolkitInterface.php, line 154
Contains \Drupal\system\Plugin\ImageToolkitInterface.

Class

ImageToolkitInterface
Defines an interface for image toolkits.

Namespace

Drupal\system\Plugin

Code

function getInfo($image);