473,396 Members | 1,945 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Sort by date picture taken

Hi,

I am displaying a bunch of pictures on my website and I would like to
sort them by a Date Picture Taken key. I have looked into exif data
and I wrote a little code that just prints all the keys and their
contents.
Code:
$file = "MyPicture.jpg";
$exif = read_exif_data ("$file");
while(list($k,$v)=each($exif))
{
echo "$k: $v<br>\n";
}

For date picture taken, All I get is:

FileName: MyPicture.jpg
FileDateTime: 1180959961
....
ExifVersion: 1220
DateTimeOriginal:
DateTimeDigitized:
CompressedBitsPerPixel: 892484151/3289658
....

nothing as you can see. Here is the info from phpinfo about my exif
setup:
exif
EXIF Support enabled
EXIF Version 1.4 $Id: exif.c,v 1.173.2.5 2006/04/10 18:23:24 helly
Exp $
Supported EXIF Version 0220
Supported filetypes JPEG,TIFF

When I download the jpg, I can view/sort by the date picture taken
using Windows Explorer.

Does anyone know why I am not seeing the DateTimeOriginal information?

If anyone knows a better way to sort by Date Picture Taken On, I'd
love to hear it. Windows can do it so it must be in there somewhere.

Jun 16 '07 #1
1 3153
Not sure, explorer may be falling back to a different value in the
absence of DateTimeOriginal. Btw, this tool can set the
DateTimeOriginal field: http://www.exifpro.com/Help/ToolDateTime.htm

On Jun 16, 6:59 am, "brandonc...@gmail.com" <brandonc...@gmail.com>
wrote:
Hi,

I am displaying a bunch of pictures on my website and I would like to
sort them by a Date Picture Taken key. I have looked into exif data
and I wrote a little code that just prints all the keys and their
contents.
Code:
$file = "MyPicture.jpg";
$exif = read_exif_data ("$file");
while(list($k,$v)=each($exif))
{
echo "$k: $v<br>\n";

}

For date picture taken, All I get is:

FileName: MyPicture.jpg
FileDateTime: 1180959961
...
ExifVersion: 1220
DateTimeOriginal:
DateTimeDigitized:
CompressedBitsPerPixel: 892484151/3289658
...

nothing as you can see. Here is the info from phpinfo about my exif
setup:
exif
EXIF Support enabled
EXIF Version 1.4 $Id: exif.c,v 1.173.2.5 2006/04/10 18:23:24 helly
Exp $
Supported EXIF Version 0220
Supported filetypes JPEG,TIFF

When I download the jpg, I can view/sort by the date picture taken
using Windows Explorer.

Does anyone know why I am not seeing the DateTimeOriginal information?

If anyone knows a better way to sort by Date Picture Taken On, I'd
love to hear it. Windows can do it so it must be in there somewhere.

Jun 16 '07 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: yer darn tootin | last post by:
Does anyone know the sort expression for a column that's data has been returned in the format, eg '07 Jul 05'?? The sort expression {..:"dd mmm yy"} doesn't work ( if the column was returned as...
2
by: Jakob Olsen | last post by:
Hi Is it possible (and if so, how) to get and set the "Date Picture Taken"-property from a picture taken with a digital camera? Y/Jakob
21
by: yeti349 | last post by:
Hi, I'm using the following code to retrieve data from an xml file and populate a javascript array. The data is then displayed in html table form. I would like to then be able to sort by each...
2
by: pizzy | last post by:
Has anyone been able to get the "Date Picture Taken" summary info from a jpg file? This info is provided in WinXP (and maybe other OS) when you click properties, summary, advance for a jpeg file. ...
2
by: joesindel | last post by:
So heres the deal... I work for a company in which numbers are dropping. The owners created a game where calling potential clients racks up points for crap like basketball ticekts and such. The...
0
by: ncrawford | last post by:
Hello All This is my first posting....and thanks in anticipation of help. Using MS Access 2000 I am recording sick days absence for individual employees. A StartDate and EndDate are entered...
5
by: Jromero | last post by:
I have a problem with printing the array Here is the print out Picture a vehicle number 1 : What's it's max speed?
3
by: aRTx | last post by:
I have try a couple of time but does not work for me My files everytime are sortet by NAME. I want to Sort my files by Date-desc. Can anyone help me to do it? The Script <? /* ORIGJINALI
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.