Exif Data - When is it populated in the CPG1410_Exif table Exif Data - When is it populated in the CPG1410_Exif table
 

News:

CPG Release 1.6.26
Correct PHP8.2 issues with user and language managers.
Additional fixes for PHP 8.2
Correct PHP8 error with SMF 2.0 bridge.
Correct IPTC supplimental category parsing.
Download and info HERE

Main Menu

Exif Data - When is it populated in the CPG1410_Exif table

Started by macmiller, December 24, 2006, 08:02:51 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

macmiller

Just getting started using coppermine.  I needed to write a script which uses exif data (the data that is camera dependent that you can see when you view info on a picture).  After getting my pictures separated into various albums I was surprised to find I had 195 picture records and only 38 exif records.  Why was some of the exif data not getting correctly populated?

I did a lookup on exif and saw some users had had previous problems with exif data, and therefore began to get discouraged.

But then what I found was that the exif data table is not populated when you upload the image, it is only populated when you do the initial view info on the image (correct me if I'm wrong).

So-- if you want to have an external script access the Exif data you must manually view info on each image first.  Is there any way to have the Exif data populated during the batch upload?  Is there a reason why it is only populated when the image is viewed?

This is more or less just a note because I think this kind of wierd and that others might be have been thrown off by it also. 

Nibbler

It reads in IPTC data on upload but EXIF only when viewed. I don't know why - might be an oversight.

include/picmgmt.inc.php


        if ($CONFIG['read_iptc_data']) {
           $iptc = get_IPTC($image);
           if (is_array($iptc) && !$title && !$caption && !$keywords) {  //if any of those 3 are filled out we don't want to override them, they may be blank on purpose.
               $title = (isset($iptc['Title'])) ? $iptc['Title'] : $title;
               $caption = (isset($iptc['Caption'])) ? $iptc['Caption'] : $caption;
               $keywords = (isset($iptc['Keywords'])) ? implode(' ',$iptc['Keywords']) : $keywords;
           }
        }


Add in code to read EXIF after here

if ($CONFIG['read_exif_data']) exif_parse_file($image);