[wp-trac] [WordPress Trac] #52192: REST API: Add batch image editing

WordPress Trac noreply at wordpress.org
Wed May 22 05:04:37 UTC 2024


#52192: REST API: Add batch image editing
---------------------------------------+---------------------
 Reporter:  ajlende                    |       Owner:  antpb
     Type:  task (blessed)             |      Status:  closed
 Priority:  normal                     |   Milestone:  5.7
Component:  REST API                   |     Version:  5.7.2
 Severity:  normal                     |  Resolution:  fixed
 Keywords:  needs-testing needs-patch  |     Focuses:
---------------------------------------+---------------------
Changes (by jessica2024):

 * keywords:  has-patch needs-testing => needs-testing needs-patch
 * version:  5.7 => 5.7.2


Comment:

 The crop values are given as percentages of the original image because the
 image shown on the front end might not be the same size as the original.
 This means you can't rely on the displayed width and height to match the
 original.

 The rotation angle is specified in degrees and rotates the image
 clockwise. Using degrees helps avoid rounding errors, especially for
 common rotations like 90 degrees. Although mathematically positive values
 in radians mean counterclockwise rotation, degrees are more intuitive for
 clockwise rotation.

 Different front-end tools might apply edits in different sequences.
 Providing an array of edits allows each tool to use the edits in their own
 order without needing to convert them.

 For example, on [Crafty Art]https://www.craftyartapp.com/k/hindu-wedding-
 cards, using 'straighten' followed by 'horizontal flip' keeps the horizon
 angle the same, meaning the flip happens before the rotation. Using
 'rotate' instead of 'straighten' results in the rotation happening before
 the flip.

 The old API still works, but if you use the new modifiers option, the old
 crop and rotation settings will be ignored.

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/52192#comment:26>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list