[Gallery] No way to rotate photos. (If a photo is taken w/ wrong rotation, e.g. from phone being held at an odd angle, you're stuck with it)

RESOLVED WONTFIX

Status

RESOLVED WONTFIX
6 years ago
9 months ago

People

(Reporter: dholbert, Unassigned)

Tracking

({b2g-testdriver, feature, unagi})

unspecified
ARM
Gonk (Firefox OS)
b2g-testdriver, feature, unagi

Firefox Tracking Flags

(b2g18-)

Details

(Whiteboard: c=gallery u=user s=v1.x-tracking, ux-tracking, ux-priority1.2)

Attachments

(1 attachment)

(Reporter)

Description

6 years ago
STR:
 1. Take a photo.
 2. Now, try to rotate that photo. (Suppose e.g. you were taking a picture of something on the ground, and the phone was unfortunately in portrait-mode when your photo wants to be landscape-mode)

ACTUAL RESULTS: There's no way to rotate a photo (no discoverable way, at least).

EXPECTED RESULTS: Should be able to rotate the photo, via the gallery or camera apps.  

The gallery lets you do fancy things like add filters, adjust exposure -- those are nice, but probably not something most users will take advantage of.  In contrast (ha!), image-rotation is a much more frequent & important use-case.

For comparison, this is trivial on Android -- "Rotate Left" & "Rotate Right" are available as menu options in their gallery app.
Component: Gaia → Gaia::Gallery
tracking-b2g18: ? → -
Keywords: feature
Created attachment 720751 [details] [diff] [review]
Rotate images in gallery patch

This patch adds rotate functionality to the edit screen in the Gallery.

The approach I took is to redraw the image when someone rotates, as this is by far the easiest way to rotate an image. Thereafter I update all the references to the image so that the other effects now use this canvas. Works pretty neat. Tested on B2G desktop and the Unagi device.

As you can see I have terrible design skills, so I'd like someone from UX to give some feedback as well (plus design some nice icon for the clockwise / counterclockwise rotation).
Attachment #720751 - Flags: review?(dflanagan)
(In reply to Daniel Holbert [:dholbert] from comment #0)
> STR:
>  1. Take a photo.
>  2. Now, try to rotate that photo. (Suppose e.g. you were taking a picture
> of something on the ground, and the phone was unfortunately in portrait-mode
> when your photo wants to be landscape-mode)
> 

It took me a while to understand what the bug was. The key here is aiming the camera at the ground, when orientation detection is unreliable.  I'm not convinced that this is a very common case or a feature that users will need very often.  So I'd say it is not something we need to address urgently.

On the other hand, image rotation is a common feature of image editors, and if we're going to add new features to the gallery app, then rotation should certainly be one of those features.

Setting needinfo for Casey so he can weigh in here.
Flags: needinfo?(kyee)
Comment on attachment 720751 [details] [diff] [review]
Rotate images in gallery patch

Jan,

I'm giving r- on this one because

1) the extra jpeg encode step is lossy and will degrade image quality

2) I'm not convinced (but haven't run the code to test) that your patch works well with the other editing modes. (I think it messes up the crop region, for example).

3) It doesn't have UX approval

4) By the time it gets UX approval, bug 826249 will have landed, and your code will be bitrotted.
Attachment #720751 - Flags: review?(dflanagan) → review-
(Reporter)

Comment 4

6 years ago
(In reply to David Flanagan [:djf] from comment #2)
> It took me a while to understand what the bug was. The key here is aiming
> the camera at the ground.  I'm not convinced that this is a very common case

Just to address this -- it's more common than you describe here.  It's easiest to trigger by taking a photo of the ground, but that's not required.

My unagi seems to have a *very* strong bias for portrait-orientation photos.  If I'm holding it in landscape orientation and then tip it up or down by ~15 degrees (very subtly), e.g. to take a photo of something slightly above me or slightly below me, then the photo ends up in portrait orientation. (I can tell w/out snapping the photo, because the icons on the display rotate automatically when it switches.)

That probably merits a separate bug -- I'm just mentioning it here because it makes this bug's situation (photo taken w/ incorrect orientation, & want to rotate it) much easier to hit.
Ah. You're still holding the phone in landscape, but it decides that it is really in portrait.  I'd file a bug on the camera app about that.  Camera manages its own orientation by listening to the orientation sensors. So the 15 degree threshold (or whatever it is) is hardcoded into the camera app and could be fixed there.
(Reporter)

Comment 6

6 years ago
(In reply to David Flanagan [:djf] from comment #5)
> I'd file a bug on the camera app about that

Cool -- I just filed bug 847680.
(Reporter)

Updated

6 years ago
Summary: [Gallery] No way to rotate photos. (If a photo is taken w/ wrong rotation, you're stuck with it) → [Gallery] No way to rotate photos. (If a photo is taken w/ wrong rotation, e.g. from phone being held at an odd angle, you're stuck with it)
I think your r- is incorrect.

1. toBlob exports to image/png, which is not lossy.
2. Yes, this works fine.
3. Correct
4. Correct, but I think this mainly runs on redrawing the image thumbnails which can easily be fixed if we decide that this is going in.
FYI, I have a patch in the works that does this the GL way, will PR tomorrow.

Comment 9

6 years ago
I have experienced the same issue and agree that there needs to be a way to rotate the image.

Functionally I think if we have a single control that rotates clock-wise, that's all that is needed.  

I don't immediately see any good options for placement of the control anywhere in the UI though.  I would ideally like to see it in the singular photo view rather then in the edit screen since this will be a commonly accessed function.   Perhaps it can live separately of the other controls in the top corner of the image?   

Changing the orientation should also save the photo in that proper orientation without needing the user to explicitly "save" the change.

Flagging appropriately so we can create some UX for this.  In the meantime it would be great to get a screenshot of where you placed the rotate function.
Flags: needinfo?(kyee)

Updated

6 years ago
Whiteboard: c=gallery u=user s=v1.x-ux-wanted
So after Casey's reply I abandon the GL version, as we aren't going to incorporate in the edit window. Guess the code can be reused as is after we've decided upon a design.

@Casey I added a header already for https://bugzilla.mozilla.org/show_bug.cgi?id=798696, we can add it there in the top corner.
Done some work on this, however we need getEditable on the DeviceStorageAPI to modify the content of the current file, because a.t.m. the only way is to write again and thus screw up file order and such. This function however is not implemented a.t.m. I added #752724 as blocking for this bug.
Unless we workaround this and put it in the effects menu of course, but that's a different story.

Updated

6 years ago
Whiteboard: c=gallery u=user s=v1.x-ux-wanted → c=gallery u=user s=v1.x-tracking

Updated

6 years ago
Whiteboard: c=gallery u=user s=v1.x-tracking → c=gallery u=user s=v1.x-tracking, ux-tracking, ux-priority1.2

Updated

6 years ago
Duplicate of this bug: 796567
OS: Linux → Gonk (Firefox OS)
Hardware: x86_64 → ARM

Comment 14

9 months ago
Firefox OS is not being worked on
Status: NEW → RESOLVED
Last Resolved: 9 months ago
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.