Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. Image.php

function Image::crop

Overrides ImageInterface::crop

File

core/lib/Drupal/Core/Image/Image.php, line 162

Class

Image
Defines an image object to represent an image file.

Namespace

Drupal\Core\Image

Code

public function crop($x, $y, $width, $height = NULL) {
    return $this->apply('crop', [
        'x' => $x,
        'y' => $y,
        'width' => $width,
        'height' => $height,
    ]);
}
RSS feed
Powered by Drupal