Announcement

#1 2017-07-06 11:42:02

NicoPL
Member
2017-07-06
6

use_iptc_mapping for filtering and batch processing permissions

Hi,

To organize my photo library, I use EXIF and IPTC fields.
I configured Piwigo to show and use exif and iptc metadata.
I managed to display exif and iptc, thanks to http://piwigo.org/doc/doku.php?id=user_ … n:metadata

However, I don't really understand what usages of metadata are available in Piwigo.
It seems that the only fields that can really be used are "keywords" and "date_creation": by using the "search word" or the "search tags".
Even when "photo description" is ticked in the search, "iptc_caption" is not reached (it did not find my pictures)
Same with the Exif, only the 'date_creation' => 'DateTimeOriginal' seems to be reached by the search action. Even when mapping other fields in the $conf['use_exif_mapping']

However, I'm looking for two features using the fields:
- filtering according to other iptc/exif fields (as asked in this post http://piwigo.org/forum/viewtopic.php?id=26580
- batch processing the permissions according to specific fields. For example, only pictures with a copyright could be public

I'ven't found any plugin to do these actions. Would you have any idea?

My conf:

Code:

$conf['show_iptc'] = true;
$conf['use_iptc'] = true;

$conf['show_iptc_mapping'] = array(
  'iptc_title'           => '2#005',
  'iptc_byline'          => '2#080',
  'iptc_byline_title'    => '2#085',
  'iptc_byline_contact'  => '2#118',
  'iptc_keywords'        => '2#025',
  'iptc_caption'         => '2#120',
  'iptc_caption_writer'  => '2#122',
  'iptc_country_code'    => '2#100',
  'iptc_country'         => '2#101',
  'iptc_city'            => '2#090',
  'iptc_copyright'       => '2#116'
  );

$conf['use_iptc_mapping'] = array(
  'keywords'        => '2#025',
  'author'          => '2#080',
  'name'            => '2#005',
  'comment'         => '2#120',
  'country'         => '2#101',
  'copyright'       => '2#116'
  );

(by the way, I think there is a mistake. 'author' should be linked to '2#080', and not to '2#122' as written in the config_default.inc.php ).


Thank you!

NicoPL

Piwigo version: 2.9.1
PHP version: 5.6.30
MySQL version: 5.5.5-10.0.31-MariaDB
Piwigo URL: https://worldsways.org/gallery/

Offline

 

#2 2017-08-19 22:33:59

executive
Member
2017-08-16
484

Re: use_iptc_mapping for filtering and batch processing permissions

Nico is correct.

The default config shows:

Code:

// use_iptc_mapping : in which IPTC fields will Piwigo find image
// information ? This setting is used during metadata synchronisation. It
// associates a piwigo_images column name to a IPTC key
$conf['use_iptc_mapping'] = array(
  'keywords'        => '2#025',
  'date_creation'   => '2#055',
  'author'          => '2#122',
  'name'            => '2#005',
  'comment'         => '2#120'
  );

If you check the IPTC specification, the photographer's name goes into property 2:80
https://www.iptc.org/std/photometadata/ … ta#creator
Property 2:122 is the name of the person who wrote the photo description.
https://www.iptc.org/std/photometadata/ … ion-writer

Here is an excerpt from  /tools/metadata.php on a sample image with these values filled in:

Code:

IPTC Fields in sample.jpg

1#090 = %G
2#000 = 
2#025 = keyword1,keyword2
2#055 = 20170622
2#060 = 100209+0000
2#062 = 20170622
2#063 = 090209+0000
2#080 = artist1
2#120 = description1


EXIF Fields in sample.jpg

Array
(
    [FileName] => sample.jpg
    [FileDateTime] => 1503172689
    [FileSize] => 888116
    [FileType] => 2
    [MimeType] => image/jpeg
    [SectionsFound] => ANY_TAG, IFD0, EXIF
    [COMPUTED] => Array
        (
            [html] => width="2133" height="1600"
            [Height] => 1600
            [Width] => 2133
            [IsColor] => 1
            [ByteOrderMotorola] => 1
            [CCDWidth] => 8mm
            [ApertureFNumber] => f/8.0
            [UserComment] => comment1
           ...

It should also  be noted that field 2#120 is correctly called "caption" (or "description" in some software), not "comment" as stated in config_default. This is confusing, because when you enter a comment in Lightroom, it is saved into the "UserComment" EXIF property (as shown above).

Offline

 

#3 2017-08-20 00:44:38

executive
Member
2017-08-16
484

Re: use_iptc_mapping for filtering and batch processing permissions

If you have tagged people's faces in Lightroom, that will also be saved to the extended IPTC data in your image file.
https://www.iptc.org/std/photometadata/ … -the-image
However, it doesn't have an IIM number, so maybe Piwigo is unable to parse it.

Offline

 

Board footer

Powered by FluxBB

github twitter facebook google+ newsletter Donate Piwigo.org © 2002-2019 · Contact