Closed Bug 1178812 Opened 9 years ago Closed 8 years ago

Rotating or resizing strip the EXIF

Categories

(Firefox OS Graveyard :: Gaia::Gallery, enhancement, P2)

ARM
Gonk (Firefox OS)
enhancement

Tracking

(Not tracked)

RESOLVED FIXED
2.6 S5 - 1/15

People

(Reporter: hub, Assigned: hub)

References

Details

(Keywords: foxfood)

Attachments

(1 file)

Rotating or resizing strip the EXIF. Even if the operation is not *directly* initated bu the user. See bug 1178290 for an example of when it happens.
Similarly related, bug 798684
Keywords: dogfood
We need to reconstruct the exif header when saving back the image after editing. We have an exif parser that allows reads and writes:

https://github.com/mozilla-b2g/exif-parser
Blocks: 1179570
QA Whiteboard: [foxfood-triage]
Assignee: nobody → hub
Severity: normal → enhancement
Priority: -- → P2
Whiteboard: [pending estimation]
Comment on attachment 8695924 [details] [review]
[gaia] hfiguiere:bug1178812-exif-copy > mozilla-b2g:master

David

Just a FYI on the current state. There are a few details I need to iron out like:

1. performance impact
2. allow disabling the copy when calling the function.

But the current patch do copy the Exif, set the values properly and have unit tests for it.

Let me know if you have serious concerns for the approach.
Attachment #8695924 - Flags: feedback?(dflanagan)
Whiteboard: [pending estimation]
Target Milestone: --- → 2.6 S3 - 12/18
Status: NEW → ASSIGNED
Comment on attachment 8695924 [details] [review]
[gaia] hfiguiere:bug1178812-exif-copy > mozilla-b2g:master

This looks good. I've left notes on Github. Feel free to alter Diego's code as needed as you import it to shared/js/media/  In particular, I notice that the code contains a lot of data that give human-readable interpretations for the values of EXIF fields. We don't need those for this bug, so you might want to strip it out to reduce memory usage and loading time.
Attachment #8695924 - Flags: feedback?(dflanagan) → feedback+
Make sure we deal with the editing use case from bug 798684 (already under my radar)
Attachment #8695924 - Flags: review?(dflanagan)
Blocks: 1179601
Blocks: 1233808
Comment on attachment 8695924 [details] [review]
[gaia] hfiguiere:bug1178812-exif-copy > mozilla-b2g:master

This is a huge patch adding an important feature that we've wanted for a long time. Given your PTO scheduled, it looks like we should be able to land it early in January.

r- because cropResizeRotate() given an jpeg image that does not require modifications still decodes and re-encodes when output type is jpeg+exif.

Also: please include the share activity in this patch or file a followup bug for that. 

And, there are some issues in ImageEditor. Looks like you're assuming that the image is a jpeg when it might not be.
Attachment #8695924 - Flags: review?(dflanagan) → review-
Blocks: 1237367
Comment on attachment 8695924 [details] [review]
[gaia] hfiguiere:bug1178812-exif-copy > mozilla-b2g:master

I think I have addressed all the comments. Removed stuff that actually was not needed. Filed a followup bug.
Attachment #8695924 - Flags: review- → review?(dflanagan)
Comment on attachment 8695924 [details] [review]
[gaia] hfiguiere:bug1178812-exif-copy > mozilla-b2g:master

I found a few more minor things to fix, but assuming you fix those, then this looks good to land. I have not actually tried running the code, and I assume that you have tested the pick and edit flows carefully on both Aries (which requires rotation) and Flame (which does not) and have verified that they work well.

Note that as it stands, I don't think this patch fixes the pick flow for the camera app, so please either fix that or file a followup bug to do it.
Attachment #8695924 - Flags: review?(dflanagan) → review+
Merged
https://github.com/mozilla-b2g/gaia/commit/d4212d824001beb182d725f91a07377ee7b1a95d
Status: ASSIGNED → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
Target Milestone: 2.6 S3 - 12/18 → 2.6 S5 - 1/15
Blocks: 1238186
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: