Janez Urevc / @slashrsm / http://janezurevc.name
Alexander Ross / @bleen18 / http://bleen.net
Source: drupal.org/drupal-services
Name | Installs | Latest release | D8 | D7 | D6 |
---|---|---|---|---|---|
Imagefield Crop | 28,664 | 2013-02 | No | Yes | Yes |
Manual crop | 27,682 | 2015-04 | No | Yes | No |
IMCE crop | 14,662 | 2013-12 | No | Yes | Yes |
Smart Crop | 8,156 | 2010-12 | No | Yes | Yes |
ImageField Focus | 8,103 | 2011-11 | No | Yes | Yes |
Focal Point | 7,708 | 2016-02 | Yes | Yes | No |
Image javascript crop | 6,519 | 2011-09 | No | Yes | Yes |
EPSA Crop | 6,301 | Unmaintained | No | Yes | Yes |
SimpleCrop | 1,702 | 2015-04 | No | Yes | No |
Media Crop | 920 | 2012-03 | No | Yes | No |
Source: https://www.drupal.org/node/1179172 |
$crop = \Drupal\crop\Entity\Crop::create([
'type' => 'dummy_crop_type',
'entity_id' => $file->id(),
'entity_type' => $file->getEntityTypeId(),
'x' => '100',
'y' => '150',
'width' => '200',
'height' => '250',
]);
$crop->save();
$crop = \Drupal\crop\Entity\Crop::findCrop($uri, $crop_type);
$size = $crop->getSize();
$position = $crop->getPosition();
// Anchor (top-left corner) is calculated on the fly.
$anchor = $crop->getAnchor();
Focal Point allows editors to specify the most important part of an image before cropping occurs.
Advanced Image Crop allows editors to define how an image should be cropeed for each defined image preset.
Let's discuss how we plan to use Crop API during our D8 upgrade of this module.
Crop API is pretty stable. We want to add support for rotation: #2691045
Our main objective at this point is supporting developers of UI modules.
Janez Urevc / @slashrsm / http://janezurevc.name
Alexander Ross / @bleen18 / http://bleen.net