forum.coppermine-gallery.net

Dev Board => cpg1.4 Testing/Bugs => cpg1.4 Testing/Bugs: FIXED/CLOSED => Topic started by: kaptainkory on August 07, 2005, 09:22:51 pm

Title: EXIF failing to be read
Post by: kaptainkory on August 07, 2005, 09:22:51 pm
I have a newer Canon digital camera.  The EXIF data is not being read properly by CPG.  I tried to figure out the minimum change necessary to correct the problem:

1) Download and use the latest EXIF library (version 1.5) from http://www.offsky.com/software/exif/index.php.  The current version does not read the files correctly.

2) In exif_php_inc.php, FIND (line 68):

Code: [Select]
        if (is_array($exifRawData['IFD0'])) {
          $exif = array_merge ($exif,$exifRawData['IFD0']);
        }

REPLACE WITH:

Code: [Select]
if (is_array($exifRawData['EXIF'])) {
          $exif = array_merge ($exif,$exifRawData['EXIF']);
        }
        if (is_array($exifRawData['IFD0'])) {
          $exif = array_merge ($exif,$exifRawData['IFD0']);
        }

Thanks.
Title: Re: EXIF failing to be read
Post by: kegobeer on August 08, 2005, 02:20:36 am
What does that code do to older camera information?  Will it break the EXIF reading for other cameras?
Title: Re: EXIF failing to be read
Post by: kaptainkory on August 08, 2005, 09:23:08 am
I have pictures from about 4 different cameras (Olympus, Nikon, and Canon) that I've tested with this code.  They all seem to work fine.  All the code does is ADDS to an array_merged.  Pretty safe, I think.
Title: Re: EXIF failing to be read
Post by: Joachim Müller on August 15, 2005, 07:29:22 am
@Tarique: since you're the exif expert, could you take a look into this?
Title: Re: EXIF failing to be read
Post by: Aditya Mooley on August 19, 2005, 02:11:30 pm
Updated the EXIF reader to 1.5 and committed to CVS.
Title: Re: EXIF failing to be read
Post by: DeadKenny on October 02, 2005, 09:03:29 pm
Will this solve the problem with Nikon ISO information being missing (especially for files from a D70)?

I know what the issue is. Nikon stick their ISO information in the maker notes and not in any standard location, so most EXIF tools miss it. At the moment the only solution is to manually hack Nikon files to stick the ISO in the EXIF :(.