Changeset 6093


Ignore:
Timestamp:
May 7, 2010, 12:23:26 PM (10 years ago)
Author:
plg
Message:

bug 1649 fixed: search EXIF/IPTC in the high definition photo if there is no
EXIF/IPTC in the web sized photo.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/picture_metadata.inc.php

    r5196 r6093  
    3030if (($conf['show_exif']) and (function_exists('read_exif_data')))
    3131{
    32   if ($exif = @read_exif_data($picture['current']['image_path']))
     32  $exif_mapping = array();
     33  foreach ($conf['show_exif_fields'] as $field)
     34  {
     35    $exif_mapping[$field] = $field;
     36  }
     37
     38  $exif = get_exif_data($picture['current']['image_path'], $exif_mapping);
     39  if (count($exif) == 0 and $picture['current']['has_high'])
     40  {
     41    $exif = get_exif_data($picture['current']['high_url'], $exif_mapping);
     42  }
     43 
     44  if (count($exif) > 0)
    3345  {
    3446    $exif = trigger_event('format_exif_data', $exif, $picture['current'] );
     
    7385if ($conf['show_iptc'])
    7486{
    75   $iptc = get_iptc_data($picture['current']['image_path'],
    76                         $conf['show_iptc_mapping']);
     87  $iptc = get_iptc_data($picture['current']['image_path'], $conf['show_iptc_mapping']);
     88  if (count($iptc) == 0 and $picture['current']['has_high'])
     89  {
     90    $iptc = get_iptc_data($picture['current']['high_url'], $conf['show_iptc_mapping']);
     91  }
    7792
    7893  if (count($iptc) > 0)
Note: See TracChangeset for help on using the changeset viewer.