Closed Bug 1143677 Opened 9 years ago Closed 8 years ago

Gallery do not make use of EXIF creation date

Categories

(Firefox OS Graveyard :: Gaia::Gallery, defect)

ARM
Gonk (Firefox OS)
defect
Not set
normal

Tracking

(tracking-b2g:backlog)

RESOLVED WONTFIX
tracking-b2g backlog

People

(Reporter: gerard-majax, Unassigned)

References

Details

(Keywords: foxfood, polish)

Attachments

(1 file)

369 bytes, application/x-sh
Details
Moving pictures from the internal sdcard of my Nexus S to a Z3 Compact, I did adb pull/adb push the pictures. This obviously makes the filesystem think all the pictures were taken the same day.

One nasty consequence is that now Gallery is rescanning my whole library, and that it is considering all pictures have been taken today. Which is obviously wrong.

As far as I could check, EXIF informations are good and provide the proper create date. We should make use of this rather than make use of the file system date.

David, is there any obvious reason not to do this ? Would it be hard to handle this ?
Flags: needinfo?(dflanagan)
Keywords: dogfood, polish
Using the EXIF date, when there is one, is probably the right way to go. Things get a little more complicated because EXIF allows various dates. The date the image was originally created, the date it was edited, etc.  But we are already doing EXIF parsing during scanning to find preview images, so looking for the date as well is not terribly hard.

MediaDB needs to store files by file modification date because that is part of how it detects changes to the filesystem.  If we want to sort files by their EXIF date instead of their file modification date, that will probably require creating a new index in the db.  And that will introduce a db upgrade step which is always a pain.

I agree that this is the right thing to do, but it is more difficult than what we're doing now. And I'm not convinced that the use case is strong enough to justify the 3.0? nomination. Most users will not be copying photos from one device to another.  And if they do, it won't be with adb pull/push.  (I wonder if copying photos via UMS or MTP preserve file creation dates?)

The gallery app was scheduled for a big refresh with lots of new features for v2.2. That is all up in the air now. When we have clarity on what we're doing in v3, we can consider this along with the other already planned features.

I'd say this is a backlog item, not a 3.0 blocker.
Flags: needinfo?(dflanagan)
(In reply to David Flanagan [:djf] from comment #1)
> Using the EXIF date, when there is one, is probably the right way to go.
> Things get a little more complicated because EXIF allows various dates. The
> date the image was originally created, the date it was edited, etc.  But we
> are already doing EXIF parsing during scanning to find preview images, so
> looking for the date as well is not terribly hard.
> 
> MediaDB needs to store files by file modification date because that is part
> of how it detects changes to the filesystem.  If we want to sort files by
> their EXIF date instead of their file modification date, that will probably
> require creating a new index in the db.  And that will introduce a db
> upgrade step which is always a pain.

Ok

> 
> I agree that this is the right thing to do, but it is more difficult than
> what we're doing now. And I'm not convinced that the use case is strong
> enough to justify the 3.0? nomination. Most users will not be copying photos
> from one device to another.  And if they do, it won't be with adb pull/push.
> (I wonder if copying photos via UMS or MTP preserve file creation dates?)
> 
> The gallery app was scheduled for a big refresh with lots of new features
> for v2.2. That is all up in the air now. When we have clarity on what we're
> doing in v3, we can consider this along with the other already planned
> features.
> 
> I'd say this is a backlog item, not a 3.0 blocker.

Ok, thanks for the explanations. I think in the meantime I'll hack
Attached file retouch.sh
For using this script, you need:
 - a local copy of all images
 - exiftool installed on your machine
 - an android system with touch -t accepting YYYYMMDD[.hhmmss]

Put yourself in the root directory containing all the images, execute retouch.sh. This will generate a shell script with the proper directives, let's say do_retouch.sh. Just adb push this to /data/local/tmp, make sure it is executable, and then adb shell into the root directory containing all your images on the device (/storage/sdcard1 for example). From there, call /data/local/tmp/do_retouch.sh

This should set the propre date on the filesystem. And when Gallery rescans, it will use the proper groups :). You may want to delete Gallery's storage from /data/local/storage/default/*gallery.gaiamobile.org/.
Another usecase that seems to trigger this is transferring over bluetooth. This may be considered as a more common usecase.
[Tracking Requested - why for this release]:
Moving to backlog based on comment 1
blocking-b2g: 3.0? → ---
Blocks: 1179570
Depends on: 1184155
See Also: → 1164810
No longer blocks: 1179570
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: