Google Product Forums

Re: How Does Android Gallery Sort Photos?

Raybo128 Jun 8, 2012 8:27 AM
Posted in group: Google Mobile Help Forum

Categories: Android Devices : Android Applications :

Paul, Thanks for the reply.  It's quite strange.  I've looked at the exif data (time and date) and they are consistent with the filenames and the actual time and date the photos were taken.  What I found after restoring the backup, the first photo was 2011-07-16 20.34.00.jpg, taken on July 16 at 8:34:00 pm.  The following photos fell in reverse chronological order to when I first bought the phone, 2011-07-01 17.54.26.jpg.  THEN the next photo is 2012-05-28 15.20.58.jpg, the last photo I took on the old phone.  The following photos from there run in reverse chronological order and the last photo is 2011-07-16 20.34.06.jpg, taken 6 seconds after the first photo.  So the sort looks like this:
July 16, 2011 20:34:00 ---> July 1, 2011 17:54:26 ---> May 28, 2012 15:20:58 ---> July 16, 2011 20:34:06

As I said, exif data is consistent with the times.  I've manipulated file modification times using jhead and touch (My desktop computer runs linux).  I even tried setting all the file mod times to the same exact time and date hoping it would then sort by file name.  No luck.

Here is the exif data from the first and last photos that were taken 6 seconds apart:

EXIF tags in '2011-08-16 20.34.00.jpg' ('Intel' byte order):
--------------------+----------------------------------------------------------
Tag                 |Value
--------------------+----------------------------------------------------------
Image Width         |3264
Image Length        |2448
Manufacturer        |SAMSUNG
Model               |SCH-I510
Orientation         |Top-left
Software            |SCH-I510.EE4
Date and Time       |2011:08:16 20:34:00
YCbCr Positioning   |Centered
X-Resolution        |72
Y-Resolution        |72
Resolution Unit     |Inch
Image Width         |640
Image Length        |480
Compression         |JPEG compression
Orientation         |Top-left
X-Resolution        |72
Y-Resolution        |72
Resolution Unit     |Inch
Exposure Time       |1/30 sec.
F-Number            |f/2.6
Exposure Program    |Aperture priority
ISO Speed Ratings   |64
Exif Version        |Exif Version 2.2
Date and Time (Origi|2011:08:16 20:34:00
Date and Time (Digit|2011:08:16 20:34:00
Shutter Speed       |4.91 EV (1/30 sec.)
Aperture            |2.81 EV (f/2.6)
Brightness          |3.20 EV (31.39 cd/m^2)
Exposure Bias       |0.00 EV
Maximum Aperture Val|2.81 EV (f/2.6)
Metering Mode       |Center-weighted average
Flash               |Flash did not fire
Focal Length        |4.0 mm
User Comment        |User comments
Color Space         |sRGB
Pixel X Dimension   |3264
Pixel Y Dimension   |2448
Exposure Mode       |Auto exposure
White Balance       |Auto white balance
Scene Capture Type  |Standard
FlashPixVersion     |FlashPix Version 1.0
--------------------+----------------------------------------------------------
EXIF data contains a thumbnail (43394 bytes).
EXIF tags in '2011-08-16 20.34.06.jpg' ('Intel' byte order):
--------------------+----------------------------------------------------------
Tag                 |Value
--------------------+----------------------------------------------------------
Image Width         |3264
Image Length        |2448
Manufacturer        |SAMSUNG
Model               |SCH-I510
Orientation         |Top-left
Software            |SCH-I510.EE4
Date and Time       |2011:08:16 20:34:04
YCbCr Positioning   |Centered
X-Resolution        |72
Y-Resolution        |72
Resolution Unit     |Inch
Image Width         |640
Image Length        |480
Compression         |JPEG compression
Orientation         |Top-left
X-Resolution        |72
Y-Resolution        |72
Resolution Unit     |Inch
Exposure Time       |1/15 sec.
F-Number            |f/2.6
Exposure Program    |Aperture priority
ISO Speed Ratings   |80
Exif Version        |Exif Version 2.2
Date and Time (Origi|2011:08:16 20:34:04
Date and Time (Digit|2011:08:16 20:34:04
Shutter Speed       |3.91 EV (1/14 sec.)
Aperture            |2.81 EV (f/2.6)
Brightness          |2.07 EV (14.42 cd/m^2)
Exposure Bias       |0.00 EV
Maximum Aperture Val|2.81 EV (f/2.6)
Metering Mode       |Center-weighted average
Flash               |Flash did not fire
Focal Length        |4.0 mm
User Comment        |User comments
Color Space         |sRGB
Pixel X Dimension   |3264
Pixel Y Dimension   |2448
Exposure Mode       |Auto exposure
White Balance       |Auto white balance
Scene Capture Type  |Standard
FlashPixVersion     |FlashPix Version 1.0
--------------------+----------------------------------------------------------
EXIF data contains a thumbnail (47709 bytes).