Image::getMimeType

public Image::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 ImageInterface::getMimeType File core/lib/Drupal/Core/Image/Image.php, line 90 Class Image Defines an image object to represent an image file. Namespace Drupal\Core\Image Code public function getMimeType() { return $this->getToolkit()->getMimeType(); }

Image::getHeight

public Image::getHeight() Returns the height of the image. Return value int|null The height of the image, or NULL if the image is invalid. Overrides ImageInterface::getHeight File core/lib/Drupal/Core/Image/Image.php, line 69 Class Image Defines an image object to represent an image file. Namespace Drupal\Core\Image Code public function getHeight() { return $this->getToolkit()->getHeight(); }

Image::getFileSize

public Image::getFileSize() Returns the size of the image file. Return value int|null The size of the file in bytes, or NULL if the image is invalid. Overrides ImageInterface::getFileSize File core/lib/Drupal/Core/Image/Image.php, line 83 Class Image Defines an image object to represent an image file. Namespace Drupal\Core\Image Code public function getFileSize() { return $this->fileSize; }

Image::desaturate

public Image::desaturate() Converts an image to grayscale. Return value bool TRUE on success, FALSE on failure. Overrides ImageInterface::desaturate File core/lib/Drupal/Core/Image/Image.php, line 170 Class Image Defines an image object to represent an image file. Namespace Drupal\Core\Image Code public function desaturate() { return $this->apply('desaturate', array()); }

Image::crop

public Image::crop($x, $y, $width, $height = NULL) Crops an image to a rectangle specified by the given dimensions. Parameters int $x: The top left coordinate, in pixels, of the crop area (x axis value). int $y: The top left coordinate, in pixels, of the crop area (y axis value). int $width: The target width, in pixels. int $height: The target height, in pixels. Return value bool TRUE on success, FALSE on failure. Overrides ImageInterface::crop File core/lib/Drupal/Core/Image/Image.php, line

Image::createNew

public Image::createNew($width, $height, $extension = 'png', $transparent_color = '#ffffff') Prepares a new image, without loading it from a file. For a working example, see \Drupal\system\Plugin\ImageToolkit\Operation\gd\CreateNew. Parameters int $width: The width of the new image, in pixels. int $height: The height of the new image, in pixels. string $extension: (optional) The extension of the image file (for instance, 'png', 'gif', etc.). Allowed values depend on the implementation of the i

Image::convert

public Image::convert($extension) Instructs the toolkit to save the image in the format specified by the extension. Parameters string $extension: The extension to convert to (for instance, 'jpeg' or 'png'). Allowed values depend on the current image toolkit. Return value bool TRUE on success, FALSE on failure. Overrides ImageInterface::convert See also \Drupal\Core\ImageToolkit\ImageToolkitInterface::getSupportedExtensions() File core/lib/Drupal/Core/Image/Image.php, line 156 Class Image

Image::chmod

protected Image::chmod($uri, $mode = NULL) Provides a wrapper for drupal_chmod() to allow unit testing. @todo Remove when https://www.drupal.org/node/2050759 is in. Parameters string $uri: A string containing a URI file, or directory path. int $mode: Integer value for the permissions. Consult PHP chmod() documentation for more information. Return value bool TRUE for success, FALSE in the event of an error. See also drupal_chmod() File core/lib/Drupal/Core/Image/Image.php, line 218 Class

Image::apply

public Image::apply($operation, array $arguments = array()) Applies a toolkit operation to the image. The operation is deferred to the active toolkit. Parameters string $operation: The operation to be performed against the image. array $arguments: (optional) An associative array of arguments to be passed to the toolkit operation; for instance, ['width' => 50, 'height' => 100, 'upscale' => TRUE] Defaults to an empty array. Return value bool TRUE on success, FALSE on failure. O

Image::$toolkit

An image toolkit object. Type: \Drupal\Core\ImageToolkit\ImageToolkitInterface File core/lib/Drupal/Core/Image/Image.php, line 29 Class Image Defines an image object to represent an image file. Namespace Drupal\Core\Image Code protected $toolkit;