[buddypress-trac] [BuddyPress Trac] #5089: Avatar rotation fix for iOS
buddypress-trac
noreply at wordpress.org
Sat Oct 3 22:42:03 UTC 2015
#5089: Avatar rotation fix for iOS
--------------------------------------------+---------------------
Reporter: modemlooper | Owner: imath
Type: defect (bug) | Status: closed
Priority: normal | Milestone: 2.4
Component: Component - Attachments | Version: 1.0
Severity: normal | Resolution: fixed
Keywords: needs-testing has-patch commit |
--------------------------------------------+---------------------
Changes (by imath):
* owner: => imath
* status: new => closed
* resolution: => fixed
Comment:
In [changeset:"10178"]:
{{{
#!CommitTicketReference repository="" revision="10178"
Make sure uploaded images are oriented the right way.
When using a mobile device to set an avatar or a cover image, there are
cases when the image can be saved upside down. We need to check the exif
Orientation of uploaded images and rotate them if needed.
Introduce 2 new methods into the `BP_Attachment` class:
- `BP_Attachment->get_image_data()` to get an array of all image datas
(including exif datas)
- `BP_Attachment->edit_image()` to edit the image orientation and/or
resize the image.
Use these two new methods within the `BP_Attachment_Avatar->shrink()` and
`BP_Attachment_Cover_Image()->fit()` methods.
Finally include a unit test for the `BP_Attachment->get_image_data()`
method to check we get the orientation meta for all supported WorPress
versions.
Props modemlooper, shanebp, r-a-y, DJPaul
Fixes #5089
See #6570
}}}
--
Ticket URL: <https://buddypress.trac.wordpress.org/ticket/5089#comment:29>
BuddyPress Trac <http://buddypress.org/>
BuddyPress Trac
More information about the buddypress-trac
mailing list