[wp-trac] [WordPress Trac] #37140: Rotating images doesn't adjust orientation for imagick

WordPress Trac noreply at wordpress.org
Sun Dec 4 22:31:27 UTC 2016


#37140: Rotating images doesn't adjust orientation for imagick
-------------------------------------------------+-------------------------
 Reporter:  triplejumper12                       |       Owner:
     Type:  defect (bug)                         |      Status:  new
 Priority:  normal                               |   Milestone:  Future
Component:  Media                                |  Release
 Severity:  normal                               |     Version:  3.5
 Keywords:  needs-testing has-unit-tests has-    |  Resolution:
  patch                                          |     Focuses:
-------------------------------------------------+-------------------------
Changes (by sanchothefat):

 * keywords:  needs-testing has-unit-tests needs-patch => needs-testing has-
     unit-tests has-patch


Comment:

 @azaozz @joemcgill I attached a rewrite (albeit with the wrong number
 suffix). It adds a helper function `wp_get_image_edit_hash()` which
 replaces the `preg_match()` calls. I haven't written a test for that yet
 but I've moved the exif orientation removal to the `_save()` method of the
 image editor class and checked it's a user edit before doing so.

 Also added tests to check orientation data is removed on various edit
 methods and that the data is preserved when no edit hash is found.

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


More information about the wp-trac mailing list