Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Problem/Motivation
Some cropping tools support rotation of crop area. One example is Cropper used by Image widget crop.
Proposed resolution
Support crop rotation information in the crop entity:
- add field to the crop entity that will store rotation of the crop are in degrees. Make sure value is between 0 and 360. Transform the value before saving if it is outside of this range.
- add api functions to work with the crop rotation (get, set, ...)
- respect rotation in image effects
- add test coverage
- make sure field is correctly added on existing installations
Comments
Comment #2
woprrr CreditAttribution: woprrr as a volunteer commented@slashrsm i need to develop this issue before to add this in ImageWidgetCrop, I come fast with you to purpose an patch. Just one thing we always use the "manual crop" effect but add one field to set rotation in degree. Is better to purpose in CropType basis an bolean to enable/disable that feature ?