Advanced search  

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

Pages: [1]   Go Down

Author Topic: Exif Data - When is it populated in the CPG1410_Exif table  (Read 2023 times)

0 Members and 1 Guest are viewing this topic.

macmiller

  • Contributor
  • Coppermine regular visitor
  • ***
  • Offline Offline
  • Posts: 80
Exif Data - When is it populated in the CPG1410_Exif table
« on: December 24, 2006, 08:02:51 am »

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. 
Logged

Nibbler

  • Guest
Re: Exif Data - When is it populated in the CPG1410_Exif table
« Reply #1 on: December 24, 2006, 08:01:23 pm »

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

Code: [Select]
        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

Code: [Select]
if ($CONFIG['read_exif_data']) exif_parse_file($image);
Logged
Pages: [1]   Go Up
 

Page created in 0.018 seconds with 20 queries.