EXIF data in PHP

Status
Not open for further replies.
For starters, I'm not a programmer. I've done a bit of Java and JSP, but it was mostly academic.

We have a site that was a package deal for photographers. It's mostly PHP files with a SQL database. When people upload images it grabs the EXIF data and shows a table with selected fields of EXIF data.

We're trying to do 2 things
1. Add Lens ID
2. change how it displays Aperture and Focal length from 50/1 to f/5.0 and 50mm. (which is strange because sample exif data shows the proper way)

This post is mostly about #1

The developer we got the package from is really not helping much, nor does he care, hence why I'm doing it.

The Lens ID is a valid EXIF tag so I basically mirrored all the existing pages for "White balance" so the code matches it. We also used a SQL command (ALTER TABLE smf_gallery_exif_data ADD exif_lensid tinytext) to update the databse.

The coding for the lens id checkbox is there the options, it just doesn't add any data. (no errors either, which is good)

We are starting to believe that the EXIF data we coded for is not correct. I used exiftool to grab some samples, but the tags are different from what I see in EXIF viewed in Photoshop.

I have tried:
exif_lens
exif_lensid
aux_lens (as per Photo Shop)

Has anyone dealt with EXIF data before, specifically lens id data?

I can post the 4 pages I altered if you want to take a look.
 

chocoruacal

Ars Tribunus Militum
2,173
StackOverflow

Are you sure that the images you are evaluating are supplying lens data in the EXIF? You can see exactly what is in the EXIF using exif_read_data(). When I look at the EXIF for images I have uploaded, the EXIF is different depending on the program I used to process them. Those that do have lens data show the data as an "unidentified tag," e.g. [UndefinedTag].
 
Status
Not open for further replies.