Problem/Motivation

Image rotate features in core have some long-term unresolved issues, see #3240390: [policy, no patch] Move image rotation code from core into contrib.

Proposed resolution

Introduce 'Rotate' effect and operations for GD and Imagemagick in Image Effects, alternative to core's. Solve most of the open core issues in doing that. Plus, allow alpha channel in background color, and fallback color when full transparent background is not supported by the image format (e.g. JPEG).

Remaining tasks

  • limit pseudorandom rotation
  • validate background color RGBA
  • fallback opaque color for transparent, also gd
  • add tests
  • add a drush command to convert core's 'Rotate' effect in image styles to Image Effects' one
  • add test for random rotation
  • add test for pseudorandom rotation

User interface changes

API changes

Data model changes

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

mondrake created an issue. See original summary.

mondrake’s picture

Issue summary: View changes
mondrake’s picture

Issue summary: View changes
mondrake’s picture

Issue summary: View changes
mondrake’s picture

Issue summary: View changes
mondrake’s picture

Issue summary: View changes
Status: Active » Needs review
mondrake’s picture

This addresses some long time standing issues from Drupal's core queue:

I will leave to a follow-up development of a drush command to convert core's Rotate effects in image styles to the effect provided here.

I am thinking of deprecating the rotate toolkit operation in the ImageMagick module in favor of the one here. Whether core will follow, it's a matter of #3240390: [policy, no patch] Move image rotation code from core into contrib.

  • mondrake committed 60cb751 on 8.x-3.x
    Issue #3246867: Introduce 'Rotate' effect and operations, alternative to...
mondrake’s picture

Status: Needs review » Fixed

Committed.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.