ImageStyle::$name

The name of the image style. Type: string File core/modules/image/src/Entity/ImageStyle.php, line 62 Class ImageStyle Defines an image style configuration entity. Namespace Drupal\image\Entity Code protected $name;

ImageStyle::$label

The image style label. Type: string File core/modules/image/src/Entity/ImageStyle.php, line 69 Class ImageStyle Defines an image style configuration entity. Namespace Drupal\image\Entity Code protected $label;

ImageStyle::$effectsCollection

Holds the collection of image effects that are used by this image style. Type: \Drupal\image\ImageEffectPluginCollection File core/modules/image/src/Entity/ImageStyle.php, line 83 Class ImageStyle Defines an image style configuration entity. Namespace Drupal\image\Entity Code protected $effectsCollection;

ImageStyle::$effects

The array of image effects for this image style. Type: array File core/modules/image/src/Entity/ImageStyle.php, line 76 Class ImageStyle Defines an image style configuration entity. Namespace Drupal\image\Entity Code protected $effects = array();

ImageStyle

Defines an image style configuration entity. Plugin annotation @ConfigEntityType( id = "image_style", label = @Translation("Image style"), handlers = { "form" = { "add" = "Drupal\image\Form\ImageStyleAddForm", "edit" = "Drupal\image\Form\ImageStyleEditForm", "delete" = "Drupal\image\Form\ImageStyleDeleteForm", "flush" = "Drupal\image\Form\ImageStyleFlushForm" }, "list_builder" = "Drupal\image\ImageStyleListBuilder", "storage" = "Drupal\image\ImageSt

ImageInterface::scaleAndCrop

public ImageInterface::scaleAndCrop($width, $height) Scales an image to the exact width and height given. This function achieves the target aspect ratio by cropping the original image equally on both sides, or equally on the top and bottom. This function is useful to create uniform sized avatars from larger images. The resulting image always has the exact target dimensions. Parameters int $width: The target width, in pixels. int $height: The target height, in pixels. Return value bool TRUE on

ImageInterface::scale

public ImageInterface::scale($width, $height = NULL, $upscale = FALSE) Scales an image while maintaining aspect ratio. The resulting image can be smaller for one or both target dimensions. Parameters int|null $width: The target width, in pixels. If this value is null then the scaling will be based only on the height value. int|null $height: (optional) The target height, in pixels. If this value is null then the scaling will be based only on the width value. bool $upscale: (optional) Boolean in

ImageInterface::save

public ImageInterface::save($destination = NULL) Closes the image and saves the changes to a file. Parameters string|null $destination: (optional) Destination path where the image should be saved. If it is empty the original image file will be overwritten. Return value bool TRUE on success, FALSE on failure. See also \Drupal\Core\ImageToolkit\ImageToolkitInterface::save() File core/lib/Drupal/Core/Image/ImageInterface.php, line 108 Class ImageInterface Provides an interface for image ob

ImageInterface::rotate

public ImageInterface::rotate($degrees, $background = NULL) Rotates an image by the given number of degrees. Parameters float $degrees: The number of (clockwise) degrees to rotate the image. string|null $background: (optional) An hexadecimal integer specifying the background color to use for the uncovered area of the image after the rotation; for example, 0x000000 for black, 0xff00ff for magenta, and 0xffffff for white. When NULL (the default) is specified, for images that support transparency

ImageInterface::resize

public ImageInterface::resize($width, $height) Resizes an image to the given dimensions (ignoring aspect ratio). Parameters int $width: The target width, in pixels. int $height: The target height, in pixels. Return value bool TRUE on success, FALSE on failure. File core/lib/Drupal/Core/Image/ImageInterface.php, line 215 Class ImageInterface Provides an interface for image objects. Namespace Drupal\Core\Image Code public function resize($width, $height);